I have a line that always has the following format
Text: 1.1111111 Text
I need a row 1.11string
So I went with this regex
^(\S*\s)(\d.\d{2})
I used http://regex101.com/ to try it and it works there, but when I do it in my code, the matching array is always empty.
This is the code
preg_match ( "/^(\S*\s)(\d.\d{2})/", $ratingString, $matches );
var_dump ( $matches );
source
share