View Single Post
Old 10-10-2011, 03:30 AM   #7
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by soparch View Post
Hello,
I wondered if anyone out there could help me. I want to be able to mark some tags up with sequential numbers and I wondered if this was possible with regular expressions.
What I want is for example to replace say

<p> with <p id="1"> <p id="2"> and so on etc, etc

I know nothing about regex's so any help would be appreciated.
Thanks
In epp:
<p id="%MATCHN%">
Perhaps your editor has something similar.

An id should begin with an alpha character so the statement would be something like:
<p id="CH_%MATCHN%">

PS: Most Grep tools have a numbering cpability.

Last edited by crutledge; 10-10-2011 at 03:41 AM.
crutledge is offline   Reply With Quote