How to remove chapter number from all titles and increase them all by one heading

I have a document translated from chapter 5 of a book, so many titles and captions have 5 at the beginning, for example, 5.1, 5.2.x, figure 5.x, table 5.x. The question is how can I remove all these preceding "5."s and then increase them by one heading, because for instance, 5.x which was formerly heading 2 would have to be now heading 1 after removing the preceding “5.”.
I guess that would be possible via Find and Replace dialog using regular expression, but I am not much experienced with them. I can already search for the said pattern using 5.([:digit:]) in the document, but I do not know what to put in replace section.
Any ideas?

The simplest way to reorganise your document is to do it from the Navigator window. However, this assumes that section numbering is inserted by LO itself (as governed by the styles or global outline numbering properties). If your section numbering is manual, you’ll have to renumber everything bt yourself or, better, to erase it and then use the automatic numbering feature.

  • Display the navigator window with ViewNavigator or F5. Your document outline is sketched in the window. The ammount of detail is controlled with the small triangles at left of section headings which allow you to expand or shrink a section.
  • Select the section you want to work upon by clicking once on its heading. This also selects all subordinate sections.
  • The upper right corner in the toolbar has four icons with various arrows. Clicking on one of them will “move” the selection in the indicated “direction”:
  • the vertical double arrows physically move the selected sections up or down relative to the surrounding equal level sections (e.g. chapters are moved as a whole),
  • the horizontal single arrows promote or demote the selection, i.e. Heading n becomes respectively Heading n-1 or Heading n+1, and the magic of it is that subordinate sections are also simultaneously promoted or demoted.

If you consider this a correct answer, please tick it for community benefit.

In your search text, 5.([:digit:]), the parentheses delineate an element that you can now capture. So in the Replace field you can put $1, with regular expressions enabled.

To change heading levels, you can use the Navigator as @ajlittoz mentions, or in the find/replace function you can enable paragraph styles and do it one level at a time.