I'm up against a brick wall on this one ... coming into work with the top down seems to have addled my already troubled mind
My "in string" is of this format:
$std_regex1="%[\w]{1,3}\d{1,5}%"; //A1, ABC12345
I want to separate the alpha character(s) from the numerics with a hyphen - the desired "out string" is "A-1" in the first example case, and "ABC-12345" in the second.
So far, I've drawn a blank on this with preg_replace() and was actually considering looping through the entire string to prepend a hyphen to the first instance of a numeric character, but I'm already way too expensive to scale this.
A good 1/2 hour of searching here and the big G isn't helping, either. Maybe more breakfast/coffee?
Any pointers are appreciated ... I'm sure I'm just being thick as usual.