dimanche 26 octobre 2014

Replace all instances of '=' with '==' in a string


Vote count:

0




I have a c# string expression where i'd like to replace all instances of '=' with '=='


e.g


1 = 1 should be 1 == 1


However, I can't just do a replace('=','==') because '1 == 1' would become '1 ==== 1'


Is there a Regex or something I could use instead?



asked 44 secs ago

Lee Smith

1,751






Replace all instances of '=' with '==' in a string

Aucun commentaire:

Enregistrer un commentaire