Let’s say we have an array (new line separated) like:
hello
example.com
test.
something.
aspacefront
test
test.us
to be an array
hello
example(dot)com.
test.
something.
aspacefront
test
test(dot)us
Can this be done with a regex?
What I’ve up to loop the array then replace to (dot) with this regex \b[^a-zA-Z\40]\b. but it will be example(dot)om rather then example(dot)com.
The simplest solution:
This means “Replace a dot only if it is preceded and followed by an alphanumeric character”.