Quote:
Originally Posted by LadyKate
For instance. How do I use regex to search for AA Name? If I use [A-Z][A-Z] [A-Z]. which I expect to match to AA Name it matches "Orbit Various Authors" and "Various Author" as well as the expected "AA Name".
|
Use
As you wrote it, the expression would find any name that has any two characters at the end of a word, then a space, then a character. Adding the leading anchor (^) tells it that it must match two characters at the beginning of the name, then a space, then a character.
Note that the meaning of ^ is different when used inside [ ] characters. In that context it means "invert the set". For example, [^AB] means everything except A and B.