Questions tagged [regular-expressions]

108 questions
-1
votes
1 answer

how to make regular expression for nginx rewrite

i wrote rewrite ^/([\w_]+)/?$ /index.php?$1 btw, i wanna except /empty. hmm.. wanna use /alphabet -> alphabet /emptyABC -> emptyABC /empty -> not match /emp -> emp /emptAB -> emptAB How can I make regular expressions for these?
user160153
  • 17
  • 1
  • 3
-2
votes
1 answer

Sed replace path for directory from special file with delimirers slash

i should change on parameter to other from template file in linux. sed -e "s/\${dir}//" /etc/nginx/site.conf But it does not work. How to resolve it ? May be there are other ways, how to…
Piduna
  • 1
  • 3
-2
votes
1 answer

matching any part of a expression using grep

How Can I use grep so as to return me all matches for not only entire expression but also any part of the expression. example: grep "foobar" foo where foo contains text foo should give me a match
debtk
  • 3
  • 2
1 2 3 4 5 6 7
8