Taking out numbers from a specific string
Posted: Wed Jan 03, 2007 12:59 am
Hello,
Dont know whether this is the right place to post or not, but I post here.
I get a string in
I use a regexp saying
the new text comes to
Now what function I need to use to get that 400,500 out of the $text;
But rather extracting from here, I would like to extract it from the regexp, is it possible, is there any function which can do that?
Thank You
Dude 81
Dont know whether this is the right place to post or not, but I post here.
I get a string in
Code: Select all
$text='<xyz:firstattrib><xyz:new>400,500</xyz:new></xyz:firstattrib> This is first message, say hello world';Code: Select all
if(preg_match("/(<.*>)+/Us", $text)){
$text = preg_replace("/(<.*>)/Us", '',$text);
}Code: Select all
$text='400,500 This is first message, say hello world';But rather extracting from here, I would like to extract it from the regexp, is it possible, is there any function which can do that?
Thank You
Dude 81