Hi,
I want to replace string with a regular expression, but it doesn't work
in powershell code work
Thanks in advance for any advice and help
david
source:
My name is ┆Name┆, My country is ┆Country┆, My age is ┆Age┆, thank you!
to:
My name is $inp_Name$, My country is $inp_Country$, My age is $inp_Age$, thank you!
Macro PS_rep_work
Macro QM_rep_notwork
I want to replace string with a regular expression, but it doesn't work
in powershell code work
Thanks in advance for any advice and help
david
source:
My name is ┆Name┆, My country is ┆Country┆, My age is ┆Age┆, thank you!
to:
My name is $inp_Name$, My country is $inp_Country$, My age is $inp_Age$, thank you!
Macro PS_rep_work
_s=
;My name is ┆Name┆, My country is ┆Country┆, My age is ┆Age┆, thank you!
str code=
;'$_s' -replace '(┆)(?<n>(?:(?!\1).)*)(\1)', '$inp_${n}$'
code.findreplace("$_s" _s)
PsCmd2 code "" _s
out _s
Macro QM_rep_notwork