I have a document with sections headed "Chapter 1"-"Chapter 45". I want to make them all caps and all in bold font by using a regex. I am stuck. I keep ending up with things like "CHAPTER "[0-9]" (replacing Chapter 8 and not bold). I tried searching for "Chapter .*$" (no quotes) to see if I could grab the line and not deal with the numbers, but that didn't work either.

Thanks so much!! I'm quite sure this is a quick fix, I just can't figure out the syntax. I've not worked on OpenOffice for several months, so I'm rusty.

2 Answers
2

You can assign a paragraph style to the titles and format the paragraph style the way you want with CAPS and bold.
To open the style window, press F11, assign a paragraph style (double click on style name) (title 1 for example) to the titles and right click on the style name to modify it. You'll find the CAPS option under font effects tab and bold under fonts.

Why not ignore the numbers and just go for ^Chapter -> ^CHAPTER ?
Assuming that Chapter indeed starts at the beginning of the line, or else if it is centered with a tab, add the tab \t between the ^ and the search/replace string.

Once you converted the chapters to capitals, you can search for CHAPTER, replace it with CHAPTER, but now with the format Bold & Italic.

You can't use Regular expressions AND Format at the same time in edit/replace.