I have a list of urls
Some have traling slashes
some do not have traling slashes
I need to remove all trailing slashes IF they exist urls look like this:
please supply the regex to find and replace
I have a list of urls
Some have traling slashes
some do not have traling slashes
I need to remove all trailing slashes IF they exist urls look like this:
please supply the regex to find and replace
Give this a try and replace with: \1\2
(http\S+)\/(\s|$)
(...)
first group captures to \1
, second to \2
\S
matches character that is not whitespace, \s
whitespace, $
the end.