1. Named capture groups for log parsing
Backend Java DeveloperBackground
An engineer needs to extract usernames and domains from support log records using java.util.regex.
Problem
Verify that named groups extract cleanly and ensure non-ASCII digits are ignored according to standard Java ASCII rules.
How to use
Input `(?<user>[a-z]+)@(?<host>\w+\.\w{2,})` into the pattern field, paste the sample log entries into the test string, and enable CASE_INSENSITIVE.
Pattern: (?<user>[a-z]+)@(?<host>\w+\.\w{2,}), Flag i: checked, Flag g: checked, Unicode classes: uncheckedOutcome
Identifies all valid email pairs, maps matches to user and host named groups, and outputs the exact Matcher Java code.