Answer the question
In order to leave comments, you need to log in
Regular season. How to determine the presence of a certain fragment inside []?
Hello!
I have the following problem, there is some text that needs to be checked for the presence of non-alphabetic characters, but possibly having numbers and the symbol "_", for this a simple regular expression like the following ^[\W\d\_]+$
worked &
: it is easy to determine, but I just don’t know how to make this fragment take into account inside the square brackets of the regular expression. I tried it as follows: ^[\W\d\_(\&\;)]+$
(for a start, I would like to at least just &
define it), but in this way the regular expression does not define a fragment in parentheses, but simply one of the characters in these brackets.
The question is how to compose a regular expression so that it correctly determines the presence of a given html character code, while the rest of the text should not contain any alphabetic characters.
For example, here is the text that this regular expression should correctly determine:
2345093489394-
&
_==+_)([email protected]#$%^&!///......000
2345093489394-
amp
_==+_)([email protected]#$%^&!///......000
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question