次のような配列(改行で区切られた)があるとしましょう:
hello
example.com
test.
something.
aspacefront
test
test.us
配列になる
hello
example(dot)com.
test.
something.
aspacefront
test
test(dot)us
これは正規表現で行うことができますか?
配列をループしてから (ドット) をこの正規表現に置き換えます\b[^a-zA-Z\40]\b.
が、example(dot)com ではなく example(dot)om になります。