I have these multiple strings like the 3 below
- Framing 50mm x 100mmx3.0m
- Loglap 22x100x4.5
- Decking 32 x 150 @3.0
What i want to do is extract the numbers into an array.
The numbers for each are either separated by @ or x
So for Framing the first array value is 50, second is 100, third is 3.0
I was thinking of using explode but the strings format aren't consistent.
How do i solve?
xor@denote anything specific, or is the only thing you're interested in the actual numbers themselves?xand@are just separators.