M
M
Maxim Timofeev2018-04-10 13:39:19
Regular Expressions
Maxim Timofeev, 2018-04-10 13:39:19

Where can I find a good manual for regexp?

I overwrought a lot of information, I don’t find a normal textbook and reference book.
I've always considered myself a quick-witted person, but regexp makes me feel like an idiot. Already n times I return to this topic trying to understand this creature. No way. Give links. Really needed.

Answer the question

In order to leave comments, you need to log in

9 answer(s)
N
Nick Sdk, 2018-04-10
@webinar

what I have in my bookmarks
javascript.ru/tutorial/regexp-specials
javascript.ru/basic/regular-expression+
valera.asf.ru/perl/book/8/8.1.html
https://habrahabr.ru/post/ 115825/
phpclub.ru/detail/article/regexp_1
phpclub.ru/detail/article/regexp_2
www.exlab.net/tools/sheets/regexp.html
https://simple-regex.com/examples
www.php.net/ manual/ru/reference.pcre.pattern.syntax.php
but I haven't opened it for a long time, I
periodically look only at this "cheat sheet"
www.exlab.net/files/tools/sheets/regexp/regexp.pdf
very interesting "lessons"
in my time gave answers to some questions on regular seasons)
https://regexone.com/

A
awesomer, 2018-04-10
@awesomer

Jeffrey Friedl's book "Regular expressions"
but is it worth it in such detail the
regular expression only looks scary - it's quite simple.

V
vitaly_74, 2018-04-11
@vitaly_74

I do not advise you to read books on regular expressions otherwise you will get confused, the best thing is practice, use https://regex101.com/ set yourself the goal of first selecting some interval from the URL, then the entire URL and so on, here is a description of the entire syntax of www.nncron. ru/help/RU/add_info/regexp.htm, I advise it this way, and not from books, because most of the examples from the book are actually not needed in life, and they are forgotten, but the meager knowledge that is given specifically for your example, well its not enough.

S
Saboteur, 2018-04-11
@saboteur_kiev

Regulars are an elementary thing. In 1 hour you can understand most of the structures.
Subtleties and advanced usage - later.
What exactly do you not understand? Wildcard characters? Groups? Quantifiers?
In regular seasons, there is nothing complicated so that it is impossible to master them right away. There may be tasks that are difficult to make regular, but so that someone could not understand or master? ...
You write an example that scares you.

X
xmoonlight, 2018-04-10
@xmoonlight

In short: one PDF page!
Also in Russian: here

D
DDDsa, 2018-04-11
@DDDsa

I once studied this:
First I read about the basics, like what \S and \s are, what does a dot do, what an asterisk does, in order to at least somehow navigate. And then I just turned on the regular expression search mode in my code editor. In the sublime, it's like this:
And I didn't turn it off anymore. First I searched as usual. With simple text searches, I slowly got used to escaping characters like ( and .
Then I began to slowly apply various regexp goodies like searching for a new line or several characters in a row.
Well, then cases began to arise when you need to find something more complicated in the text. In general, these cases occur for everyone and always, it's just that those who do not know regular expressions get out of the situation in other (often less convenient) ways. But here I basically tried to solve each case with the help of regular expressions. At first I just googled, then I found the site www.regexr.com . There are, in fact, many of them. There is a cheat sheet for regexp commands and a sandbox where you can check all the commands with beautiful highlighting.
That's all. In fact, I didn’t even learn anything (except for the hour that I spent reading about the basics), I just didn’t turn off the regular expression search mode in sublim and didn’t allow myself to solve search problems in other ways.
Now I can't live without regulars.

S
sitalya, 2018-04-20
@sitalya

My bookmark regexpstudio.com/en/regexp_syntax.html

K
Kastian, 2021-05-27
@iSmoke

For the usual, "domestic" level - as recommended, Goyverts' "Collection of Recipes". This is middle.
And in order to UNDERSTAND how they work, write optimized and unbugged regular expressions - Friedl. It's already a senor.
Both books are awesome!

S
Sergey, 2022-01-18
@PATRIOT

That was enough for me, Pts everything is well stated
https://medium.com/nuances-of-programming/cheat sheet...
And this is a super service for checking/debugging regulars
https://regex101.com/r/cO8lqs/2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question