View Single Post
Old 09-23-2014, 03:01 AM   #11
Chris_Snow
Zealot
Chris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipse
 
Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
@eschwartz

Hey...I was just having a play with your code and can see what goes on. I'm guessing that to pick up all the headings, you'd have to have each one listed in the "Find" regex. That would mean I'd have to know all the title headings.

Is there a way to do the same thing without knowing all the headings?

I started out trying to do it with "([A-Z])([A-Z]+)" using this type of regex, but I've found this doesn't work.

Using the original regex

Code:
(CHAPTER )(\w)(.+?\b)((-)(\w)(.+?\b))?
I thought perhaps there was some other code we could replace the "(CHAPTER )" part with and that would pick of all the other title headings and CHAPTER .

It could well be possible that you can't do this and I''ll have to either use two different regex's or do the rest of it manually??

Much appreciated.
Chris_Snow is offline   Reply With Quote