Sorry, but I am a regular kettle. I sit studying the manual and seravno does not reach
^[iI]{1}[dD]{1}([1-9]*)$ It is necessary not to miss ID + Number
For example
id123
Id123
ID123
iD132
id
123
Help please
Sorry, but I am a regular kettle. I sit studying the manual and seravno does not reach
^[iI]{1}[dD]{1}([1-9]*)$ It is necessary not to miss ID + Number
For example
id123
Id123
ID123
iD132
id
123
Help please
Since there are two groups that can be present independently of each other, is it worth separating them and using a quantifier ? which indicates that the group can be repeated once or absent
(id)?(\d+)? To check was not case sensitive, you must use the flag i (ignorecase)
/(id)?(\d+)?/i Perhaps you can do with one group.
/(id)?\d*/i This is for search
id123 Id123 ID123 iD132 id separated by spaces: \s?([Ii][Dd])(\d+)?\s
Source: https://ru.stackoverflow.com/questions/505043/
All Articles