Answer the question
In order to leave comments, you need to log in
How to write a regular expression "find everything up to the question mark"?
It's been a long time and now I decided to master regular expressions.
I climbed a bunch of information and examples, but for the life of me I don’t understand how it is written “find everything before” or “find everything after”
here is an example:
$value = 'https://toster.ru/question/new?id=vasya';
$links = preg_replace('/*\?/','',$value);
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