[Solved] RegEx to determine if string is score [closed]
[ad_1] This will match a number, followed immediately by a hyphen, followed immediately by another number, allows for multi-digit numbers, and has groups to give you each of the scores. preg_match(‘/([0-9]+)\-([0-9]+)/’, $string, $match); That should work for you. 1 [ad_2] solved RegEx to determine if string is score [closed]