What if you could extract multiple substrings from a line โ only if it starts with a special character โ using a single regular expression?
- No lookahead.
- No repeated captures.
- No scripting.
- Just pure regex wizardry: \K + (?<=\G)
๐ง In this article, I show:
How to simulate a loop in regex
- Real-world examples for:
- Filtering words after @
- Capturing only inside quotes
- Ignoring content in {...}
- A clean, powerful way to extract multiple values under complex conditions
Perfect for parsing logs, selective data mining, or just leveling up your regex game ๐งช
๐ Read here: Innovative "Loop" in Regex on Medium
Top comments (0)