Skip to main content

Posts

Showing posts from September, 2007

Multiline and regular expressions troubles

I had some problems with Ruby on rails while working in the Bullet on rails framework. Regexp.new("(class [^$]+)$", Regexp::MULTILINE) will basically match your whole file until the end. Regexp.new("(class [^\n]+)", Regexp::MULTILINE) will match only the line that starts with "class". Also, if you have problems with JavaScript, try doing rake rails:update:javascript.