We have a query(mysql) which returns data in the following format of alphabets followed by digits followed by alphabets like —
text1 12.12 mg text2
Now the issue is , i need to write a script in php which gives all the data starting from the 1st digit.so the result should be something like
12.12 mg text2
I am not sure how to accomplish this in php and the functions which might be of use for this purpose.
Any help would be appreciated.
the
\\d+means one or more consecutive digits.(.*)means match any character except a new line.$tells it to go to the end of the string…