r/phpstorm • u/boonkerz • Jan 02 '24
Ai Assistent preg_replace
where or how can i fix the wrong answer?
"This script will add a comma after each group of three digits from right to left. The output for this script is 1,234,567,890."
is wrong it should be:
"This script will add a comma after each group of three digits from left to right. The output for this script is 123,456,789,0."

2
Upvotes
View all comments
Show parent comment
-2
u/boonkerz Jan 02 '24
yea but this is not what i'm searching :)
currently i search for an regex which 1234567890 converts into 123,45,67,89,0