Answer the question
In order to leave comments, you need to log in
Add zero before single digit?
Hello!
Row options
2:5
4:15
21:26
14:7
02:05
04:15
21:26
14:07
/(^|\D)(\d)($|\D)/, "$10$2$3"
Such an expression corrects if only one of the numbers is non-zero. And when both numbers, then only the first number is corrected. Answer the question
In order to leave comments, you need to log in
все гораздо проще:
паттерн - /\b(\d)\b/g
заменa - 0$1
https://regex101.com/r/46zqqu/2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question