Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The \| operator is a GNU extension, and mod_sed implements sed as implemented in Solaris 10, so this is likely not possible.

share|improve this answer
    
That's what I thought but I came here for hope! –  Andrew Hancox Apr 16 '12 at 11:06
    
I hope they add it in a future version! (How's that for hope?) :-) –  Kyle Smith Apr 16 '12 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. –  Andrew Hancox Apr 16 '12 at 11:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.