There is a regular basis ^\\+?([0-9]+)(@.*)?$ And an example of it is "79101234567", which for some reason does not fit. Why? And what number could suit her?
Closed due to the fact that the essence of the issue is not clear to the participants Denis , Bald , user194374, Denis Bubnov , Alex 1 Jan '17 at 7:10 .
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
- And what language, what method? Look, everything works fine . - Wiktor Stribiżew
- The language is specific, but the regulars there seem to be perl'ovye. - Timur Musharapov
- 2At your very beginning, the expression is checked to ensure that the string starts necessarily on 1 or more backslashes, - Mike
- In your expression, the @ symbol is expected - RusArt
- @RuslanArtamonov is not necessary - Vadim Ovchinnikov
|
1 answer
79101234567 will not work, because a slash is expected at the beginning (fragment ^\\ ). Examples that fit
\79101234567 \\\\79101234567 \79101234567@test General advice: see your regulars at https://regex101.com/ . There they are clearly decomposed into its component parts.
|