Answer the question
In order to leave comments, you need to log in
How to find all numbers in a string after a semicolon?
Help me out, I’m breaking the last convolution, I re-read a bunch but never entered.
Line example:
"iPhone 8; CPU iPhone OS 11_4_1 like Mac OS X; TELE2RU-SUBSCRIBER-POOL-NET; Tele2 Russia IP Network (NIN)"
Find all numbers after the first semicolon. How to find everything after the first ";" - found how to find all the numbers - found, I can’t combine (
Answer the question
In order to leave comments, you need to log in
// $str - исходная строка
$second = explode(';', $str)[1];
$number = filter_var($second, FILTER_SANITIZE_NUMBER_INT);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question