Thread: Regex and span
View Single Post
Old 01-18-2013, 09:22 PM   #2
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
My regex fu must be on the blink.
This regex search should work, but it's not working in Sigil, does work in EditPad though, so perhaps it's a problem with the regex engine?

Code:
(?<=<span\sclass="(bold|italics)">)(.+?)(?=</span>)
The group that stores the text will be \2 (not the usual \1 - which here will be the bold|italics class)

Is that any use?

EDIT: This works in Sigil (with your example).
Search for
Code:
(?<=">)(.+?)(?=</)

Last edited by Perkin; 01-18-2013 at 09:28 PM.
Perkin is offline   Reply With Quote