Thread: Regex examples
View Single Post
Old 03-08-2014, 10:44 AM   #315
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
yep:

find:

<a href="#id

followed by a capturing group `()` that contains one or more integers `\d+`

(\d+)

followed by

"

replace:

<a epub:type="noteref" href="#id

followed by a back-reference to the captured group above

\1

followed by

" xmlns:epub="http://www.idpf.org/2007/ops"

this site is an invaluable reference for anything regex, basic to advanced:
http://www.regular-expressions.info
mzmm is offline   Reply With Quote