KillA Posted August 14, 2014 Report Share Posted August 14, 2014 Есть фраза Счет: 1:2 (0:2) как выташить выделенные числа ? Что-то я туплю никак не получается проверить на вхождение скобку "(" Quote Link to comment Share on other sites More sharing options...
ahvahsky2008 Posted August 14, 2014 Report Share Posted August 14, 2014 (edited) (?<=\().+(?=\))http://cdn.joxi.ru/uploads/prod/2014/08/14/a7f/38f/02cb6aa6032235cf52fb027ca7928a3bc5a9d9e8.png Edited August 14, 2014 by ahvahsky2008 Quote Link to comment Share on other sites More sharing options...
as_lan Posted August 14, 2014 Report Share Posted August 14, 2014 ahvahsky2008, Есть хороший учебник по регуляркам, начиная с азов и заканчивая сложными формулами? Часто надо работать с регулярными, но плохо знаю синтаксис. Quote Link to comment Share on other sites More sharing options...
KillA Posted August 14, 2014 Author Report Share Posted August 14, 2014 вот что в конечном счете понадобилось ((?<= \()\d{1,2}(?=\:\d{1,2}\)))|((?<= \(\d{1,2}\:)\d{1,2}(?=\))) :D :D Quote Link to comment Share on other sites More sharing options...
ahvahsky2008 Posted August 15, 2014 Report Share Posted August 15, 2014 as_lan, http://shop.oreilly.com/product/9780596528126.do на русском тоже есть[merge_posts_bbcode]Добавлено: 2014-08-15 08:17:49[/merge_posts_bbcode] KillA, че пишешь Quote Link to comment Share on other sites More sharing options...
bionix Posted August 15, 2014 Report Share Posted August 15, 2014 as_lan, держиРегулярные выражения, 3-е издание (фай… л PDF).pdf — 5 МБРегулярные выражения. Сборник рецептов … л PDF).pdf — 4.7 МБ Quote Link to comment Share on other sites More sharing options...
ahvahsky2008 Posted August 15, 2014 Report Share Posted August 15, 2014 На хабре видел тесты на проверку регулярок. Помогите найти Quote Link to comment Share on other sites More sharing options...
RNZ Posted August 15, 2014 Report Share Posted August 15, 2014 вот что в конечном счете понадобилось ((? :D :DЖесть.Всё гораздо проще: \((\d+):(\d+)Для некоторых интерпретаторов : тоже надо заэкранировать Quote Link to comment Share on other sites More sharing options...
KillA Posted August 15, 2014 Author Report Share Posted August 15, 2014 RNZ, нет, мне именно то, что я написал нужно было ) Quote Link to comment Share on other sites More sharing options...
The_GOD Posted January 13, 2017 Report Share Posted January 13, 2017 кто может написать регулярное выражение для проверки свидетельства о рождении ? Серия: римские цифры (в латинском регистре), две буквы кириллицей Quote Link to comment Share on other sites More sharing options...
DAGpro Posted January 13, 2017 Report Share Posted January 13, 2017 Примерно так: [a-z]{2}[а-я]{2} Можно изменить значение регуляки a-z, а-я под конкретные данные. {2} цифру заменить на то количество символов диапозона, которые надо обработать. Quote Link to comment Share on other sites More sharing options...
The_GOD Posted January 14, 2017 Report Share Posted January 14, 2017 @DAGpro,к сожалению не все так просто. [spoiler=римские цифры (в латинском регистре) ] Quote Link to comment Share on other sites More sharing options...
ahvahsky2008 Posted January 14, 2017 Report Share Posted January 14, 2017 http://javatalks.ru/topics/33627 Quote Link to comment Share on other sites More sharing options...
gadz Posted January 19, 2017 Report Share Posted January 19, 2017 http://regexr.com/ такие сайты помогут тоже вам Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.