Page 1 of 1

How to add \t before and after the number using regex

Posted: 07.01.2023 09:04
by Valuex
I get the following text snippet

Code: Select all

a12b
c23d
I would like to add tab before and after the digital number, like

Code: Select all

a  12  b
c  23  d
I've tried to find

Code: Select all

(\d{2})
, and replace it with

Code: Select all

 \t\1\t
, but it doesn't work.
Any comment on how to make this kind of replacement work? Thanks.

Posted: 07.01.2023 16:18
by miro.matas
HTH

Posted: 08.01.2023 00:24
by Valuex
It works! Thank you very much. @miro. matas

Posted: 09.01.2023 09:54
by main Alexey