x


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

more ▼

asked Nov 17 '10 at 03:57 AM

dansav gravatar image

dansav
373 104 131 154

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x7
x1

asked: Nov 17 '10 at 03:57 AM

Seen: 1217 times

Last Updated: Nov 17 '10 at 03:57 AM