![]() |
#1 |
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Jun 2010
Device: none
|
Sequential numbers regex?
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 |
![]() |
![]() |
![]() |
#2 |
Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 520
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Regular expressions cannot generate sequential numbers. With Emacs you would be able to do this.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Jun 2010
Device: none
|
Thanks for the reply
But what is emacs? |
![]() |
![]() |
![]() |
#4 |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,895
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,997
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() did everything with EMACS: Write programs, send mail, make Pizza ![]() Me I was lucky to save my file without introducing more errors ![]() |
|
![]() |
![]() |
![]() |
#7 | |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
<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. |
|
![]() |
![]() |
![]() |
#8 | |
Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 520
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
RegEx: Removing Page Numbers that have Spaces | captainslow | Conversion | 2 | 02-27-2011 04:14 PM |
Is there a hack for displaying page numbers rather than location numbers? | nesler | Kindle Developer's Corner | 16 | 02-15-2011 12:00 AM |
Help with regex to remove specific strings of numbers | adrian1944 | Conversion | 9 | 02-14-2011 01:11 PM |
My RegEx isn't doing what I hoped to remove page numbers and a fixed string | winterminute | Calibre | 6 | 12-19-2010 10:55 PM |
Regex help... | Bobthebass | Workshop | 6 | 04-26-2009 03:54 PM |