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
Have something to add?