Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?:MyPrint #\w+\K,\h*|(?!^)\G\h*)([^;\r\n]+);?
/
gm
Input 1
MyPrint #FileNo, Tab(1); "My Text Here"; MyPrint #FileNo, Tab(col); Txt; MyPrint #FileNo, Tab(100); Format(TheDate, "DDMMMYYYY") & " " & Variable_Name & "Field : " & Format(Field, "x") MyPrint #FileNo, Tab(1); Format(TheDate, "x") & " - " & TheName; MyPrint #FileNo, String(132, "-") MyPrint #FileNo, Tab(6); "SOME VALUE"; "SOME MORE VALUES"; MyPrint #FileNo, Tab(100); "First Text"; "Second Text" MyPrint #FileNo, "Third Text"; "Fourth Text"
Substitution
, \1
MyPrint #FileNo, Tab(1); "My Text Here"; MyPrint #FileNo, Tab(col); Txt; MyPrint #FileNo, Tab(100); Format(TheDate, "DDMMMYYYY") & " " & Variable_Name & "Field : " & Format(Field, "x") MyPrint #FileNo, Tab(1); Format(TheDate, "x") & " - " & TheName; MyPrint #FileNo, String(132, "-") MyPrint #FileNo, Tab(6); "SOME VALUE"; "SOME MORE VALUES"; MyPrint #FileNo, Tab(100); "First Text"; "Second Text" MyPrint #FileNo, "Third Text"; "Fourth Text"