A
A
alex995052015-10-20 09:24:49
PHP
alex99505, 2015-10-20 09:24:49

Regular season. How to add conditions?

Help me choose a universal expression that, when querying
Table_name(1)/field?select=Name
, would choose, if there is a Table_name at all, whether there is an index after it - if so, then its value is
also further than field and Name
, that is, all these parameters may or may not be passed.
So far, I have only selected everything, if the query string is completely filled out.
(\w+)(\(\d+\))\/(\w+)\?(\w+)\=(.*)
You need to add conditions, if there is no element with the given mask, then return emptiness.
The answer must be an array with a constant number of cells.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Mokhov, 2015-10-20
@alex99505

https://regex101.com/r/tK2zX8/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question