Search code examples
regexdreamweaver

Change all href links in Dreamweaver using RegEx


I am trying to use Dreamweaver Find and Replace regex feature, to find and replace all href links that start with "/url-to-page.html" to "./url-to-page.html"? But not sure how to do so. Can someone please help with any example on how to do so (Regex required to do so) ? Thanks


Solution

  • Find : <a href="\/(.*?)">
    Replace: <a href="./$1">

    Make sure you check Use regular expression at the bottom