I’m trying to wrap my head around regex, but would appreciate some help on this.
The given string is "38min *08min 38 *08min 36 *01min *26 50 *15min *41 *11min *41"
Trying to parse this string in PHP so that:
arr[0] = "38"
arr[1] = "08,38"
arr[2] = "08, 36"
arr[3] = "01, 26, 50"
arr[4] = "15, 41"
arr[5] = "11, 41"
I need an output something like this.
Since the
*delimiters seemingly are incoherent, I would use an awfully complex regex for that:Gives you:
You’ll have to reassemble the [1] and [2] and [3] entries for your wanted strings.