using php preg_match

fluffNots

New Member
I am trying to use PHP preg_math parse a string that looks like:\[code\]6.15608128 Norwegian kroner\[/code\]I just want the first part (the digits), not the text. I wrote a simple regex like \[code\][0-9\.]+ \[/code\]that works fine in regex testers, but PHP complains about the '+'. Can anyone help me write this regex so it's valid for the preg_match function? I've tried a ton of different ideas but I'm really not too knowledgeable with regex.Thanks for any tips.
 
Back
Top