5 Apr 2000 tausq   » (Master)

Hrm, looks like my FA classes didn't quite sink in. <sigh> the question was: is there a way to strip shell-style comments (# blah). As it turns out, this perl regexp does the trick.... (from bod)

s/^((([^\\"#]+|"[^\\"]*(\\.[^\\"]*)*")*|(\\.)*)*)(#.*)?/$1/
I had argued that you cannot do this with a standard (FA) regular expression, but as aj pointed out to me, this shouldn't be the case. So, as an exercise for the reader, rewrite that in a form that sed recognizes.... :-)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!