What is a good regex to match the entire string, unless the string is "/"?
Use case:This is for a rewrite rule. Working with rack-rewrite, which is appending a trailing /.
I need:
/foo -> /newpath/foo
/ -> newpath
The second example does not have a trailing slash.
Took a look at Regex - Match Entire String Unless but didn't know how to make it work for all except "/".
Working in Ruby.