- Home /
Question by
dansav · Nov 17, 2010 at 03:57 AM ·
expression
regular expression g equivalent in unityscript?
How do you do a regular expression in unity3d that will replace all the instances.
in javascript this would be done using g
re=/hello/g; mystring="hello my baby hello my honey"; result=mystring.replace(re,"goodbye");
I know in Unity3d it would be something like this
myresult=Regex.Replace(mystring,"hello","goodbye"); but where do you put the g?
Thanks,
Dan
Comment
Your answer
Follow this Question
Related Questions
IL2CPP compiled expressions performance 2 Answers
Whats wrong with this script? 1 Answer
what would you call this face? 0 Answers
assertion failed on expression ismatrixvalid(matrix) 0 Answers
Expression cannot be assigned to, doing it wrong, but how? 1 Answer