Exclude emails in search and replace across whole database.
Closed this issue · 2 comments
anasmoiz commented
Is there any way to exclude emails across the whole database? for example, I moved a site from one domain to another. In doing so I applied a search and replace from domain.com to newdomin.com, It changed the email as well from info@domain.com to info@newdomain.com. I was able to revert back to the old state for email by using a search and replace from @newdomain.com to @domain.com
Can you let me know what should I do to avoid search and replace across the database for emails. if the solution can be achieved using -x flag could anyone share more details.
gwenya commented
A regex (-g
flag) with a negative lookbehind should work: (?<!@)example.com
gianluigi-icit commented
can be a nice feature