PHP में preg_match के साथ एक ही स्ट्रिंग के एकाधिक घटनाओं को खोजने के लिए नियमित अभिव्यक्ति के लिए सही वाक्यविन्यास क्या है?एकाधिक घटनाओं को खोजने के लिए PHP preg_match
$string = "/brown fox jumped [0-9]/";
$paragraph = "The brown fox jumped 1 time over the fence. The green fox did not. Then the brown fox jumped 2 times over the fence"
if (preg_match($string, $paragraph)) {
echo "match found";
}else {
echo "match NOT found";
}
http के साथ प्रयास करें: // www .regex-tester.de/regex.html – Gordon