Hello all,
According to this link:
http://www.rubycentral.com/ref/ref_c_string.html#gsub
I would like to use ruby (a really cool language that you
should check
out if you haven't) to do something like this:
"Madison High School - WI".gsub(/([\s\-])/,
'\\1')
To transform the string to this:
"Madison\ High\ School\ \-\ WI"
Instead the method call returns this:
"Madison High School - WI"
I'm no master of regular expressions as this example
clearly
demonstrates and I'm sure I'm not escaping either the
regular
expression pattern or the replacement string.
Any assistance would be greatly appreciated.
Regards,
Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|