I need to be able to get a matching combination from a string. Example:
$mystring = "This is my text00123 blah blah";
$code = magicRegex( $mystring, "text"[0-9] );
return "you are a wizard - your code is " . $code;
Return:
you are a wizard - your code is text00123
Then, I need to separate the text from the integers into separate variables.
As another alternative, named catching:
Demo:
Working Demo
Oops, reversed the arguments. ;p