If you only want to change exactly http://www.something.com/something (with or without slash) to http://www.something.com/something/index.html try:
s{ http://www\.something\.com/something # the URL you are looking for # remeber to backslash '.' (?!\w) # a negative look-ahead asserti +on # do not allow a dirname of 'so +methinglong' /? # an optional slash } # end of search pattern { # replace with http://www.something.com/something/index.html }gx
-- Hofmator
In reply to Re: What regex will swap somewebpage/ with somewebpage/index.html ??
by Hofmator
in thread What regex will swap somewebpage/ with somewebpage/index.html ??
by agent00013
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |