Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 - and the apache doc but can't find anything.

share|improve this question
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


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.