On 29 Jan 2008, at 23:35, Suraj K. wrote:
Since Ruby does not have a negative look behind operator, I just
the negative look ahead in a backwards way, et viola!
puts a.reverse.gsub(/erit(?!.*wons)/, ‘>>>&<<<’).reverse
Aha! I like your style.
James Edward G.'s when-all-else-fails-reverse-the-data triumphs again.
On Jan 30, 2008, at 9:49 AM, Andrew S. wrote:
James Edward G.'s when-all-else-fails-reverse-the-data triumphs
I love that trick.
James Edward G. II
I know this is an old post, but was trying to do something similar and
came up with this:
Does that meet the required need? If it’s full line matches you’re
looking for, I think it should do the trick.
Greg Bacon schreef:
I negated the test, to make the regex simpler: […]
Yes, your approach is simpler. I assumed from the “need it all
in one pattern” constraint that the OP is feeding the regular
expression to some other program that is looking for matches.
Yes, I assumed about the same, but thought it would be a nice
“Gewoon is een tijger.”