in reply to What regex will swap somewebpage/ with somewebpage/index.html ??

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

  • Comment on Re: What regex will swap somewebpage/ with somewebpage/index.html ??
  • Download Code