regex - How to replace any_string@a.net to any_string@b.com -
how replace any_string@a.net any_string@b.com using regex?
i want strip @a.net , replace @b.com
i've tried
(.*@a.net)
but $1 showing string. when try replace it, became
any_string@a.net@b.com
and can point me nice tutorial regarding regex?
the ()
indicates capture group. put parts of expression don't want capture outside parens:
(.*)@a.net
a great site play around regular expressions http://refiddle.com/.
i fiddled problem already.
Comments
Post a Comment