I have a string filled with script tags for Javascript files where I would like to replace all instances of .js with .min.js. I can't assume that the contents of the string will be in the same format as shown below. So I need to restrict the replace to within the src= part.
I'm assuming that a regex would be best for this, but how would I go about doing the find, then replace for all instances?
<script type=\"text/javascript\" src=\"../../Scripts/json.js\"></script><script type=\"text/javascript\" src=\"../../Scripts/Logger.js\"></script> <script type=\"text/javascript\" src=\"../../Scripts/PageHelper.js\"></script>
The other consideration would be that I wouldn't want to replace .min.js where it is already defined as min.js.