Regex change uppercase to lowercase in anchor tag href

Stevan
Stevan
40 Points
20 Posts

I want any regex expression where can change all Uppercase to lowercase in href attribute in anchor tag.

For example:

<a href="/Category">Text</a>
<a href="/Abc-XYZ">Text</a>
<a href='/CategorY/'>Text</a>

Output should like:

<a href="/category">Text</a>
<a href="/abc-xyz">Text</a>
<a href='/category/'>Text</a>

I'm trying in Notepad++.

Views: 57
Total Answered: 1
Total Marked As Answer: 0
Posted On: 01-Aug-2020 05:25

Share:   fb twitter linkedin
Answers
Rashmi
Rashmi
Member
144 Points
32 Posts
         

Following steps:

  1. Ctrl+H
  2. Find what: (?<=href=['"])[^'"]+
  3. Replace with: \L$0
  4. UNcheck Match case
  5. check Wrap around
  6. check Regular expression
  7. Replace all

Posted On: 01-Aug-2020 06:20
 Log In to Chat