586How to search a QUESTION MARK in a regular expression
- Oct 9, 2012I have a bunch of lines in a file that look something like this:
I want to strip everything to the right of and including the QUESTION MARK using a regular expression
/ ?fred(.*)p=31 did not work as a search string in FIND.
It did work if I removed the question mark - but that left the question mark in place after the REPLACE.
I can - turning the regular expression block off - FIND/REPLACE the question mark with a less tricky character and then run (with RegEx on) the FIND/REPLACE to get rid of everything to the right of and including the new character - but that is additional steps.
Is there a way to identify the question mark as a question mark instead of special character within the original RegEx FIND/REPLACE? (The [:?:] construct did not seem to work.)
- Next post in topic >>