The below is an example of a very large text file that I have:
@Don't replace this line: <http://nomatch.com#>
/or this line!/
<http://example.com#Example/Replace/With/Underscores> and <http://example.com#Example/Replace/With/Underscores2>
</Nothing to replace on this line either./>
I would like to replace all instances of /
(forward slash) on each line after <http://example.com#Example/
and before >
. Therefore, the resulting file should look like:
@Don't replace this line: <http://nomatch.com#>
/or this line!/
<http://example.com#Example_Replace_With_Underscores> and <http://example.com#Example_Replace_With_Underscores>
</Nothing to replace on this line either./>
So far I have come up with the regex: (?=.*?>)/
, but this is grabbing every /
on a line with a >
(link to example). At the moment I'm using VSCode to perform the find and replace.
question from:
https://stackoverflow.com/questions/65948959/replace-all-instances-of-a-character-within-context 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…