From: hurcan solter Date: 2007-08-29T07:15:05+09:00 Subject: gsub help Hi there; this is more of a regexp question but I'de be happy if you help me since i am doing it in ruby. i want to beautify some line by inserting or removing some space around the operators like = or == so i came up with an expression like; line.gsub!(/\s*([=]+)\s*/ ,' \1 ') But it applies every = on the line ofc, but I want to exclude expressions between quotation marks ("sth=sth") or regexp (/sth=sth/). I've tried negated character classes and such to no avail.How can I do this? Any help would be greatly appreciated... Hurcan