[Coldstuff] regexp

coldstuff@cold.org coldstuff@cold.org
Thu, 30 Aug 2001 20:36:43 -0600


On Thu, Aug 30, 2001 at 09:16:11PM -0500, Adam Cormany wrote:
> I'm not good at regexp at all. I'm the first to admit that:) I'm having trouble figuring out how to do this in cold:
> 
> I want to check a string for "{" or "{a", "{b", "{c" .. "{z", but I don't want to find "{a}", "{b}", "{c}". How can I achieve this on cold with its regexp? Or is there a better way of doing this?
> 
> The reason why I'm doing this is I want to find the above occurrences and change them from "{a" to "\{a". I don't want to touch the "{a}" since they are tags.
> 
> Thanks for all your help before and now,
> Adam

;strsed("asdf{a bcd", "({[^}]+)", "\\%1");
=> "asdf\{a bcd"

-Brandon