I have script tags everywhere in CSHML files. Something like below
<script src="~/Areas/Users/Somefilename.js"></script>
Using the regular expression i want to replace it using Visual Studio 2017 find and replace with the following
@Scripts.Render("~/Areas/Users/Somefilename.js")
The path parameter remains the same.
So based on the SO post
In find box i put <script src=.*></script>
and in replace box i put @Scripts.Render($1)
it finds the line in cshtml but replace does not work. It actually puts $1
instead of the path. @Scripts.Render($1)