Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

regex to change href link to lowercase

I have pages with links like:

href="FileName-One-Example.html"

I need to a regular expression command with Notepad++ to change the case of the anything between href=" nad the ending " to lowercase, and leave everything before and after it in the page as is.

So the result is:

href="filename-one-example.html"
like image 259
Mike Avatar asked Sep 05 '13 18:09

Mike


1 Answers

This is the correct regexp to use:

Find: (href=")([^"]*)
Replace: \1\L\2\E

Edit: changed the second \L to \E as suggested in the comments.

like image 130
krisku Avatar answered Nov 08 '22 11:11

krisku