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

24355Character class question

Expand Messages
  • John Shotsky
    Feb 17, 2014
    • 0 Attachment

      I have some text in which some lines start with spaces, sometimes with a colon somewhere in the middle of the spaces like:

              :      Start of text.

      I wrote a clip to remove those characters entirely, but it fails with a syntax error.

      ^!Replace "^[: ]+" >> "" ARSW

      When it displays the syntax error, the left bracket is missing.

      I've tried reversing the space and colon, and I've tried escaping the colon, but it continues to cause a syntax error.

      I've even tried isolating the colon with spaces on both sides, but that still doesn't help:

      ^!Replace "^[\x20:\x20]+" >> "" ARSW

      Always, the left bracket is missing in the error message.

      If I add parens into the clip, it works as expected, but of course that means it is capturing something that is simply going to be deleted.

      ^!Replace "^([: ]+)" >> "" ARSW

      Does anyone understand why this is happening?


    • Show all 5 messages in this topic