I want to use extended regular expression syntax in a mod_sed rule - specifically the or operator |, does anyone know of a way to do this or an alternative approach? I've looked at the authors blog - https://blogs.oracle.com/basant/entry/using_mod_sed_to_filter and the apache doc http://httpd.apache.org/docs/2.3/mod/mod_sed.html but can't find anything.
1 Answer
The \|
operator is a GNU extension, and mod_sed implements sed as implemented in Solaris 10, so this is likely not possible.
-
-
I hope they add it in a future version! (How's that for hope?) :-) Apr 16, 2012 at 11:08
-
It'll do. It seems a strange decision to base it off vanilla rather than extended sed, but I guess there's performance considerations. Apr 16, 2012 at 11:35