S
S
sbh2019-06-11 03:56:52
Apache HTTP Server
sbh, 2019-06-11 03:56:52

How to use symbols || in mod_substitute (apache)?

This module has a symbol | used as parameter separator.
And I just need to insert a line like this. a || b
I tried to use escaping by type a \|\| b- it does not work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-06-11
@dodo512

httpd.apache.org/docs/2.4/mod/mod_substitute.html As a
regex, only pattern is processed , while substitution is processed as a regular string, so you |can use it freely . needs to be shielded . Another option . s/pattern/a || b/
s/\Qa || b\E/abc/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question