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

Literal ampersand must be escaped when using Regular Expressions

Expand Messages
  • barry_andrews
    When doing a search & replace using regular expressions, part of the term included the ampersand (&), as in non-breaking space ( ). I discovered through
    Message 1 of 2 , Aug 9, 2012
    • 0 Attachment
      When doing a search & replace using regular expressions, part of the term included the ampersand (&), as in non-breaking space ( ).

      I discovered through trial and error that when it is necessary to display the ampersand literally, as here, it must be preceded by the escape character (\), since the ampersand symbol is also an operator used in regular expressions.

      As I could not find this mentioned in the Help guide I thought I'd post it here.
    • DZ-Jay
      Thanks for that! I didn t know it was not included in the help file. Just so you know, any special character used in pattern matching can be escaped
      Message 2 of 2 , Aug 26, 2012
      • 0 Attachment
        Thanks for that! I didn't know it was not included in the help file. Just so you know, any special character used in pattern matching can be escaped similarly.

        dZ.

        On Aug 09, 2012, at 08:44, barry_andrews wrote:

        > When doing a search & replace using regular expressions, part of the term included the ampersand (&), as in non-breaking space ( ).
        >
        > I discovered through trial and error that when it is necessary to display the ampersand literally, as here, it must be preceded by the escape character (\), since the ampersand symbol is also an operator used in regular expressions.
        >
        > As I could not find this mentioned in the Help guide I thought I'd post it here.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.