As an example I’ll use this line:
/*! jQuery v1.7.1 jquery.com | jquery.org/license */
how would I use preg_match to find and isolate into a $version variable the 1.7.1?
Taking into account that the version number in that string will change dynamically without notice.
so in plain English it would sound like:
find the term 'jQuery v' and grab the following characters up until a space is found
Here’s an interactive php session for you:
As you can see, the first match group contains your version number.