TODO: Escape characters in patterns
explain ?
rex parses it's input to match something like [m|s]<delimiter>pattern<delimiter>substituion<delimiter>[flags]. eg.
s/dog/cat/i
Matching is VERY trivial and it will not work if you use delimiter character inside of the pattern, e.g.: substitution of all http: to http://
s/http:/http:/// usually you should write it like s/http:/http:\/\// - but none of those two ways will work right now.
However it can be easily solved by using other delimiter:
s!http:!http://!
The only thing is you are not allowed to use delimiter character inside pattern right now.
so you should give the user the option to modify the delimiter character ?
It's already there. The same as in perl you can write s/dog/cat/ or s?dog?cat? or whatever s!dog!cat!. rex automatically detects what is the delimiter sign. Check the source code.