Regular Expressions
32 published questions
What you’ll find here
- Short, practical answers with runnable Perl code blocks.
- Sandbox-verified output (proof that the example actually runs).
- Notes on common pitfalls and version differences.
- advanced • 2025-12-30How to validate email addresses using Perl regex?
- intermediate • 2025-12-30How to split a string by regex pattern in Perl?
- intermediate • 2025-12-30How to use greedy vs non-greedy quantifiers in Perl regex?
- beginner • 2025-12-30How to match start and end of string with ^ and $ in Perl?
- beginner • 2025-12-30How to use alternation | in Perl regex?
- intermediate • 2025-12-30How to use the qr// operator to compile regex in Perl?
- advanced • 2025-12-30How to match Unicode characters in Perl regex?
- advanced • 2025-12-30How to use the /e modifier for code evaluation in substitution?
- intermediate • 2025-12-30How to perform regex match and extract all matches in Perl?
- beginner • 2025-12-30How to use the \d, \w, \s character classes in Perl regex?
- intermediate • 2025-12-30How to use negated character classes [^...] in Perl regex?
- beginner • 2025-12-30How to use character classes [a-z] in Perl regex?
- beginner • 2025-12-30How to escape special characters in Perl regex?
- intermediate • 2025-12-30How to match word boundaries with \b in Perl regex?
- advanced • 2025-12-30How to use negative lookbehind (?<!...) in Perl regex?
- advanced • 2025-12-30How to use lookbehind assertions (?<=...) in Perl regex?
- advanced • 2025-12-30How to use negative lookahead (?!...) in Perl regex?
- advanced • 2025-12-30How to use lookahead assertions (?=...) in Perl regex?
- intermediate • 2025-12-30How to use the /m modifier for multi-line anchors in Perl?
- intermediate • 2025-12-30How to match across multiple lines with /s modifier in Perl?
- intermediate • 2025-12-30How to use the /x modifier for readable regex in Perl?
- beginner • 2025-12-30How to perform a global substitution in Perl?
- intermediate • 2025-12-30How to use non-capturing groups (?:...) in Perl regex?
- intermediate • 2025-12-30How to access captured groups using $1, $2 in Perl?
- intermediate • 2025-12-30How to use capture groups in Perl regex?
- beginner • 2025-12-30How to use the global modifier /g in Perl regex?
- beginner • 2025-12-30How to use the case-insensitive modifier /i in Perl regex?
- beginner • 2025-12-30How to perform a simple regex match in Perl?
- intermediate • 2025-12-29How to use the /g modifier for global matching
- advanced • 2025-12-29How to use lookahead and lookbehind in Perl regex
- intermediate • 2025-12-29How to use the /x modifier for readable regex
- intermediate • 2025-12-29How to use named capture groups in Perl regex