Extract numbers from text with regular expression

DarknessFalls

New Member
I am trying to extract \[code\]1\[/code\] and \[code\]125\[/code\] from this text with PHP:\[code\]preg_match("/^(?P<digit>\d+)/", "1 Foo ($125)",$m)\[/code\]Can you please help?Thanks
 
Back
Top