Ask Your Question

How to replace all an all capitalized paragraph default style to a heading style

asked 2019-05-31 04:24:29 +0200

aegiswiz gravatar image

I have a very large file where the whole document is default style and the headings are all written with all caps. I want to search for all caps paragraphs in default style and replace them all with a heading style.

Seems to me this would be a common problem for folks who didn't think about styles but were wise enough to make headings special or recognizable.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-05-31 09:06:23 +0200

RGB-es gravatar image

It's possible doing some RegExp magic. For languages that distinguish between uppercase and lowercase, Unicode has a "tag" to distinguish both cases. Let's suppose that only on the paragraph you want transform into headings you'll find words with two or more consecutive uppercase characters, then

  1. Open the full search & replace tool with Ctrl H
  2. Check the option to distinguish lowercase from uppercase (it's just below the search box)
  3. Check the option to use regular expressions (it's under "more options")
  4. On the search box type (\p{Lu}){2,}
  5. Click on "Find all"
  6. Alt TAB to return the focus to the document and then Ctrl 1 to apply the Heading 1 paragraph style


I wrote an introduction to Regular Expressions (even if this particular topic is not considered there) in my free book about Writer.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-31 04:24:29 +0200

Seen: 65 times

Last updated: May 31 '19