24355Character class question
- Feb 17, 2014
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?
- Next post in topic >>