Hi Ben,

All I can say is HOLY MACKERAL!

You probably know the countless hours that novice coders spend on challenges such as these. I was trying to loop through the string, setting StartPosition and EndPosition variables, and NewStartPosition, and New EndPosition, etc., and it was generally a total waste of a day.

Now it is 1:30am here, and I see your solution, and am blown out of the water (please excuse the multiple fish puns). the \1 syntax is the key! Thank you!

>>> rereplace("##([^##]+)##", '"&##\1##&"', "all")

I will try this tomorrow, as I am pretty much out of gas right now. I am assuming that you can safely mix single quotes with double quotes on the REReplace attributes, as you have done... as long as the string character is opposite quote type as the attribute qualifier.

Anyway... I am now throughly convinced that with complete and true mastery of RegularExpressions you would be able to take over the world!!

Until that day...

Rob Fish
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to