Create RegEx from matches

I want to create a RegEx pattern from given matches
for example, I want to get <b>\d+<\b>from the next array of matches

<b>1</b>
<b>2</b>
<b>3</b>
<b>4</b>
<b>5</b>
...

any ideas?

+2
source share
2 answers

Tool

From the answer to a similar question, the link below can help you:

txt2re : a regular expression generator on the network.

Understanding

If you are looking for a deeper understanding of the topic instead of a quick fix, you should read the answers to the following question: Is it possible for the computer to "learn" regular expression based on user-provided examples?

Encoding

If you want to copy a quick solution yourself, this answer is worth a look.

Note

, , , .

+4

(GP) : Regex Generator ++. , , .

, , . ( : ) , , .

, (GP) .

+2

Source: https://habr.com/ru/post/1697973/


All Articles