0

I cant figure out how to replace this string:

RewriteRule .*\/Custom\/([a-zA-Z0-9\-]+)\/expose_(short|long)\.php(.*)  https://111.111.11.11/markt3/Custom/expose.php?customer=$1&variant=$2$3 [QSA,NC,L]

with this:

RewriteRule (.*)\/Custom\/([a-zA-Z0-9\-]+)\/expose_(short|long)\.perl $1/Custom/expose.perl?kunde=$2&variant=$3 [QSA,NC,L]

Can I do this with sed? If yes -> how can do this with sed? All the special charakter making it quite difficult

Thanks

lfk
  • 1
  • 3
  • 1
    You can but **what is you pattern?** – Shakiba Moshiri Apr 05 '17 at 13:08
  • Take the tour (http://stackoverflow.com/tour), read (http://stackoverflow.com/help/how-to-ask). You should demonstrate that you did some experimenting yourself. And you might find the part of the sed documentation (or tutorial) interesting which talks about extended regexes `-E` and "escaping". – Yunnosch Apr 06 '17 at 06:17
  • Possible duplicate of [Is it possible to escape regex metacharacters reliably with sed](http://stackoverflow.com/questions/29613304/is-it-possible-to-escape-regex-metacharacters-reliably-with-sed) – NeronLeVelu Apr 06 '17 at 09:02

0 Answers0