Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
🎩Agent 301 Puzzle | Sept 6
🧩Cards in Order:11:10:7:13
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Sept 4
🧩Cards in Order:13:16:8:1
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Sept 2
🧩Cards in Order:5:9:13:1
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Sept 1
🧩Cards in Order:15:4:12:13
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 31
🧩Cards in Order:8:13:1:4
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 30
🧩Cards in Order:6:11:5:10
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 29
🧩Cards in Order:5:14:10:12
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 27
🧩Cards in Order:2:3:10:5
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 26
🧩Cards in Order:12:6:5:13
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 24
🧩Cards in Order:5:15:11:4
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 23
🧩Cards in Order:3:5:2:12
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle
🎩Agent 301 Puzzle | Aug 21
🧩Cards in Order:8:16:13:4
⚠️ Follow the sequence above to match perfectly!
❓How to Play:
1. Open @Agent301
2. Go to “Games” → “Puzzle”
3. Enter the combo and win!
🔥 Good luck and have fun!
🔔Subscribe
👉Join Agent301
➖➖➖➖➖➖➖➖➖➖
#Agent301#DailyPuzzle