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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -