groovy

No way to escape the / character in Groovy regex

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1-beta-2
  • Component/s: parser
  • Labels:
    None
  • Number of attachments :
    0

Activity

Hide
Paul King added a comment -

I applied a fix for this. For the record, old behaviour was:

/ was only allowed if preceded by an odd number of \ characters. All characters were preserved.
\ at the end of a line escaped the end of line (i.e. acts as continuation character) so long as it wasn't preceded by an odd number of \ characters.

New behaviour is:

\ escapes end of line and / in which case the \ is removed. In all other cases, \ is preserved.

Show
Paul King added a comment - I applied a fix for this. For the record, old behaviour was: / was only allowed if preceded by an odd number of \ characters. All characters were preserved. \ at the end of a line escaped the end of line (i.e. acts as continuation character) so long as it wasn't preceded by an odd number of \ characters. New behaviour is: \ escapes end of line and / in which case the \ is removed. In all other cases, \ is preserved.
Hide
Paul King added a comment -

Correct fix version

Show
Paul King added a comment - Correct fix version

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: