August 24th, 2013, 03:57 PM
"between 0 and X" not working as expected?
I wanted to quickly strip all those line numbers and extra line returns by making a simple regular expression to find & replace:
won't match anything in RegExr (google "RegExr Gskinner"), and in sublime text 2 it is matching as expected....
Why is this?
August 24th, 2013, 05:14 PM
I'm pretty sure this pattern is not what you want. It matches any sequence of digits or spaces anywhere in the whole input. If you run it on a piece of code, you'll end up with a mess.
The first thing you'll need is an anchor to only match digits at the beginning of a line:
The regex may need further fine-tuning, but I can't tell without seeing the concrete input.
I have no idea why you get no matches in RegExr. But why does that matter, anyway?
August 25th, 2013, 09:29 AM
Or get an text editor that can work in column mode to remove the first characters on every line.