Jump to content
Sign in to follow this  
pixartist

Need help with a regex string!

Recommended Posts

pixartist

the string looks like this:

"SAY 2345;nickname: text\n"

while number and text are variables of course...

this won't work:

$regexstr = 'SAY [0-9]+;' & $clients[$cr][$h][0] & ': .*\n'

any idea?

Share this post


Link to post
Share on other sites
Nahuel

And what you want to do is...

Share this post


Link to post
Share on other sites
pixartist

And what you want to do is...

ehm regex replace?

Share this post


Link to post
Share on other sites
Nahuel

Well.. you didn't say it. Is this of any help?

$string="SAY 2345;nickname: text\n"
$regexstr = 'SAY (\d*?);(.*?): (.*?)\\n'

$Res=StringRegExp($string,$regexstr,1)

MsgBox(0,"",$Res[0])
MsgBox(0,"",$Res[1])
MsgBox(0,"",$Res[2])

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×