I have the following string below which was extracted by DOM Document
:
$scripts = $doc->getElementsByTagName('script');
$script = $scripts->item($i);
$string = $script->getAttribute('src');// Save the string 'jquery-3.2.0.min.js'
I have 3 ways to check if this string is a jquery:
jquery(?:\\-|\\.)([\\d.]*\\d)[^/]*\\.js\\;version:\\1
/([\\d.]+)/jquery(?:\\.min)?\\.js\\;version:\\1
jquery.*\\.js
In that case how can I validate the above string using one of these 3 commands?