# NotePad++ Mass edit of HTML tags?



## can (Sep 27, 2014)

Okay so what I have here is this tag I am wanting to edit:

```
<a  rel="nofollow" href="11">
```
And I am wanting the tag to look like this:

```
<a  rel="nofollow" href="11.htm">
```

Now here is the fun part the '11' is pretty much going to change from page to page, so my question is how can I edit... well a shit tone of pages, without having to change the '11' over and over again?


----------



## Taralack (Sep 27, 2014)

Pretty sure you're shit out of luck mate. You're probably gonna have to do a Find and replace for each page. Someone else might have an idea though.


----------



## LizardKing (Sep 27, 2014)

Depending on how screwed up your problem is, you might be able to monkey up some python to do it or similar. Presumably you're using windows - since you mentioned notepad++ - so you won't be using bash or perl or whatever.


----------



## Teckolf (Sep 29, 2014)

Wll if there aren't any other numbers on those pages you might be able to write a unix shell, C, matlab, whatever, script to replace the numbers sequentially by file name. I mean if it is less than say 100 pages its probably easier to do it manually if you arent good with an easy procedural language...


----------



## kayfox (Oct 4, 2014)

use sed


----------



## Xela-Dasi (Oct 4, 2014)

take your favorite drink, and change it manually with your favorite music.


----------



## V3N44X (Nov 8, 2014)

is there only one per page?

Also, notepad++ has a find and replace if you hit ctrl+f so you don't actually have to find em all.

EDIT: Just realized I bumped this pretty bad... sorry about that. Have to remember to look at dates on this place.


----------



## Vo (Nov 9, 2014)

In case this is still relevant or somebody else is interested, try this: 

Find: 


```
<a  rel="nofollow" href="([0-9])([0-9])">
```

Replace: 


```
<a  rel="nofollow" href="\1\2.htm">
```

Tested OK in medit, will check in Notepad++ when I'm on a Windows box, but I figure it should work fairly universally.

(Don't forget to set search and replace to regex mode.)

Then: 

https://www.google.com/search?q=notepad+++search+and+replace+in+multiple+files


----------

