Regex format number

Hey there,

just a quick question about regex (or find and replace regex) and formatting numbers (which are formatted to text already)

I want to have a minimum two digit number, but no maximum.

So there will be the following cases:

1 → 01
.
.
9 → 09

10->10
150->150

Any ideas here?

Please no workarounds with conditionals or anything else, because that takes way too much time :slight_smile:

Thanks in advance!

When NUMBER < 10 then text = 0NUMBER

1 Like

thats what i was doing before, but its really annoying when you have that 20 times with the following format 00:00. I would need to do this to every single number.

I found a solution with find &replace using regex.

Find: \b(\d)\b
Replace by: 0$1

Thats for a minimum of two digits.

Thanks anyway @rpetribu .

1 Like