How can I use regular expressions in find and replace to add a leading zero

I want to make all the endnote text numbers that appear after a period and are followed by an empty space two digit numbers like 01, 02, 10, 11, instead of 1, 2, 10, 11.

Is there a combination of general expression symbols that can be used in the “search for” and “replace with” fields of the Writer “find and replace” operation that will add a leading zero to every single digit number while not affecting double digit numbers to make all numbers be double digit numbers?

It does not appear to me that this is possible, but if it is, I would like to find out how.

for my experience, it’s not possible, because of “numbers” in writer are just “simple text”, characters, and you can not change the format in the same way calc does.

You cannot use ‘Find & Replace’ (and thus no regular expressions) for the purpose because the footnote/endnote labels are neither text nor numbers contained in the text but special fields including a linkage generated by a background process. Even if you define a footnote label to be 01 by explicitly entering this (left of the ‘Character’ button) and waiving automatic incrementation you will not find it using ‘Find & Replace’ whether or not using a regex.

As > ‘Tools’ > ‘Footnotes/Endnotes…’ does not offer numeric formats with leading zeros there will be no way to fulfil your wishes without enhancing the source code. You may file a feature request.