Answer the question
In order to leave comments, you need to log in
Remove any text and symbols and numbers up to a space through regexp?
Yesterday I asked a similar question and derived 2 working formulas
1. preg_replace('/^.*?[\d\s,]+/siu', '', $text)
2. preg_replace('/([\d\,\ s]+)/siu', '|', $text)
The input data can be different:
"20,123 black/white"
"12af12 black/white"
'ad123 black/white'
"123b;fa.123 black/white"
" 13.31 black /
white "
(on the last line, the transfer may be, it would also be desirable to remove it, so that the line is black / white)
And you need to remove absolutely any data up to the space,to get only the black/white string.
It can be more black/white/red/blue
, but it is important that the enumeration string is saved so that it can be entered into the array.
I really hope for help. I already tried everything myself
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question