• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Dreamweaver Regex Find & Replace help.

Community Beginner ,
Oct 23, 2019 Oct 23, 2019

Copy link to clipboard

Copied

I'm new at GREP & Regular Expressions (regex). I've searched here and found what I thought was a solution but I can't get it to do what I want it to. Basically, Using "Find and Replace in Files" I need to find all URL links in a set of files and modify/replace all the  code before and after the URL, but leave the URL intact.

 

I want to replace the code colored red:

<a href="https://www.myfancywebsite.com">

 

With this:

<a href="#" onclick="cordova.InAppBrowser.open ('https://www.myfancywebsite.com', '_system', 'location=yes');">

 

I tried doing this by creating a subexpression with wildcard character set but it didn't work. Clearly I'm not getting this at all...

I tried using this as the search: 
<a href="https://([.+\b])">  

And this as the replace:

<a href="#" onclick="cordova.InAppBrowser.open ('https://([.+\b])', '_system', 'location=yes');">

 

Is this even possible? Any help would be reallly appreciated.

 

Thanks,

Steve

 

 

Views

190

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation