I have build myself an Regular expression, which works absolutely fine when tried on various RegEx testing Websites, but now im trying to implement this into an PHP Script, and its constantly throwing errors.
I tried this:
$pattern1 = preg_quote('/<span\ id="current\-followers\-value"\ class="profile\-info\-content">(\d*)</span>/');
preg_match($pattern1,$request,$followercount);
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in C:\xampp\htdocs\instagram\getuserinfo.php on line 11
I also tried
preg_match('/<span\ id="current\-followers\-value"\ class="profile\-info\-content">(\d*)</span>/',$request,$followercount);
Warning: preg_match(): Unknown modifier 'p' in C:\xampp\htdocs\instagram\getuserinfo.php on line 10
Can someone maybe explain me what to do?
My pattern is:
<span\ id="current\-followers\-value"\ class="profile\-info\-content">(\d*)</span>
Test String:
<span id="current-followers-value" class="profile-info-content">142</span>