pixartist Posted January 16, 2008 Share Posted January 16, 2008 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? Link to comment Share on other sites More sharing options...
Nahuel Posted January 16, 2008 Share Posted January 16, 2008 And what you want to do is... Link to comment Share on other sites More sharing options...
pixartist Posted January 16, 2008 Author Share Posted January 16, 2008 And what you want to do is...ehm regex replace? Link to comment Share on other sites More sharing options...
Nahuel Posted January 16, 2008 Share Posted January 16, 2008 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]) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now