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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -