I am using software which uses regular expressions to search text files. Files matching the regular expression are then made available for inspection.
I need to search for cases where two strings must be present, and the second string must occur after the first string, but no more than x chars after the first. In this case, the last character of the second string is always an apostrophe.
For example, looking for string one “ABC” and string two “XY'” where string two must begin no more than 5 places after the end of string one:
"ABCxxxxXY" // match
"ABCxxxxxxxxxXY" // not a match.
Another, maybe better, way to look at this would be to define a match as containing string one, then containing “XY” immediately preceding the next apostrophe.
"ABCxxxxxxxxXY" // match.
"ABCxxxxxxxxx'xxxxxXY" // not a match.
Thanks
Mike Thomas
This would do.
You need this,