Loading ...
Sorry, an error occurred while loading the content.

586How to search a QUESTION MARK in a regular expression

Expand Messages
  • EB
    Oct 9, 2012
    • 0 Attachment
      I have a bunch of lines in a file that look something like this:

      Ga53t76lah/Z3vdeg14/V0c2/?freds=OTvvA4OfhbfjI6MQ,0,0,0,&p=31

      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.)

      Thank you.
    • Show all 6 messages in this topic