Agarwal Sundeep / Агарвал Сандип - Understanding JavaScript RegExp / Изучаем регулярные выражения JavaScript [2023, PDF, EPUB, ENG]

Reply to topic
DL-List and Torrent activity
Size:  7 MB   |    Registered:  1 year 1 month   |    Completed:  5 times
Seeders:  660  [  0 KB/s  ]   Leechers:  26  [  0 KB/s  ]   Show peers in full details
 
   
 
 
Author Message

Download WYSIWYG ®

Gender: Male

Longevity: 10 years

Posts: 1539

Post 06-May-2024 02:45

[Quote]

Understanding JavaScript RegExp: Example based guide to mastering JavaScript regular expressions / Изучаем регулярные выражения JavaScript: руководство по освоению регулярных выражений JavaScript, основанное на примерах
Год издания: 2023
Автор: Agarwal Sundeep / Агарвал Сандип
Издательство: Leanpub
Язык: Английский
Формат: PDF, EPUB
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 83
Описание: Scripting and automation tasks often need to extract particular portions of text from input data or modify them from one format to another.
This book will help you learn JavaScript Regular Expressions, a mini-programming language for all sorts of text processing needs.
The book heavily leans on examples to present features of regular expressions one by one. It is recommended that you manually type each example and experiment with them.
Exercises are included to test your understanding. Reference solutions are also provided.
Prerequisites
You should be familiar with programming basics. You should also have a working knowledge of JavaScript syntax and functional programming concepts like map and filter.
You are also expected to get comfortable with reading documentation, searching online, visiting external links provided for further reading, tinkering with illustrated examples, asking for help when you are stuck and so on. In other words, be proactive and curious instead of just consuming the content passively.
В задачах создания сценариев и автоматизации часто возникает необходимость извлекать определенные фрагменты текста из входных данных или изменять их из одного формата в другой.
Эта книга поможет вам изучить регулярные выражения JavaScript, мини-язык программирования для всевозможных задач обработки текста.
В книге много примеров, на которых представлены возможности регулярных выражений одно за другим. Рекомендуется вручную вводить каждый пример и экспериментировать с ними.
Включены упражнения для проверки вашего понимания. Также приведены справочные решения.
Предпосылки
Вы должны быть знакомы с основами программирования. Вы также должны обладать практическими знаниями синтаксиса JavaScript и концепций функционального программирования, таких как map и filter.
Также ожидается, что вы научитесь читать документацию, выполнять поиск в Интернете, переходить по внешним ссылкам, предоставленным для дальнейшего ознакомления, работать с иллюстрированными примерами, обращаться за помощью, когда у вас что-то не получается, и так далее. Другими словами, проявляйте инициативу и любопытство, а не просто пассивно изучайте контент.

Примеры страниц (скриншоты)

Оглавление

Preface 5
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Feedback and Errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Author info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Book version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Why is it needed? 7
How this book is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
RegExp introduction 9
Console and documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
test() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
RegExp constructor and reuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
replace() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Anchors 15
String anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Line anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Word anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Opposite Word Anchor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Alternation and Grouping 22
Alternation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Precedence rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Escaping metacharacters 26
Escaping with backslash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Dynamically escaping metacharacters . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Dynamically building alternation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
source and flags properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Escaping the delimiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Escape sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Dot metacharacter and Quantifiers 32
Dot metacharacter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
split() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Greedy quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
AND Conditional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
What does greedy mean? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Non-greedy quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
s flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Interlude: Tools for debugging and visualization 42
regex101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
regulex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
regexcrossword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Working with matched portions 44
match() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
search() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Capture groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
d flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Getting all the matched portions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
matchAll() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
split() with capture groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using functions in the replacement section . . . . . . . . . . . . . . . . . . . . . . . 48
Using dictionary in the replacement section . . . . . . . . . . . . . . . . . . . . . . . 49
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Character class 54
Custom character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Range of characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Negating character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Matching metacharacters literally . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Escape sequence sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Numeric ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Groupings and backreferences 61
Backreferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Backreference oddities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Non-capturing groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Named capture groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Interlude: Common tasks 69
CommonRegexJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Lookarounds 70
Conditional expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Negative lookarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Positive lookarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Capture groups inside positive lookarounds . . . . . . . . . . . . . . . . . . . . . . . 72
AND conditional with lookarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Variable length lookbehind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Negated groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Unicode 79
Unicode character sets and the u flag . . . . . . . . . . . . . . . . . . . . . . . . . . 79
v flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Codepoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Cheatsheet and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Further Reading 83
[solely-soft.top].t195455.torrent
Torrent: Registered [ 2024-05-06 02:45 ] · C163890710880F7077BCEE6ADAC47F7600E084F8

10 KB

Status: checked
Completed: 5 times
Size: 7 MB
Rate: 
(Vote: 0)
Have thanked: 1  Thanks   (List)
Agarwal Sundeep / Агарвал Сандип - Understanding JavaScript RegExp / Изучаем регулярные выражения JavaScript [2023, PDF, EPUB, ENG] download torrent for free and without registration
[Profile] [PM]
Forum Topic Author Size
Programming Agarwal Sundeep / Агарвал Сандип - Understanding Python re(gex)? Example based guide to mastering Python regular expressions / Разбираешься в Python re(gex)? Основанное на примерах руководств... Programmer 3 MB
Display posts:    
Reply to topic

Current time is: 06-Jun 17:21

All times are UTC + 2



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum