Answer the question
In order to leave comments, you need to log in
Finding a character at a specific position in a string using a regular expression?
What does a regular expression look like, for example, for the following task:
find strings that do not contain the characters 'b', 'c', 'd'; there will be at least one 'a' in the entire string, except for the second position.
For example, the strings: 'aeghjk', 'aeaaasf' will match,
but the strings 'qwerty', qberty', 'q a sdfg' will not. In the last line 'a' in the second position in the line
Answer the question
In order to leave comments, you need to log in
Something like this:^([^bcd][^abcd][^bcd]*a[^bcd]*|a[^abcd][^bcd]*)$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question