View Single Post
Old 02-04-2011, 09:17 AM   #3
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Regular expression find and replace?

It would depend on the particular system/editor. In Vim I would search for:

^\s*Chapter\s*[0-9XVI]*\s*$

That breaks down like this:
^ = start of line
\s* = any amount (inluding none) of whitespace (spaces, tabs, etc.)
Chapter = the word Chapter
\s* = any amount of whitespace again
[0-9XVI]* = a string of any length consisting only of 0-9 X and V and I
\s* = any amount of whitespace again
$ = the end of the line
And replace with

<h1>&<\/h1>

which is the search pattern but with <h1> HTML tags around it.

Not sure if Sigil supports something like that (I don't use it), but it might. If not, you can use any advanced Text editor.
frabjous is offline   Reply With Quote