Test, validate and match regular expressions
This regex captures an IPv4 address enclosed in square brackets, as commonly found in snmptrapd log lines. It matches the bracketed IP and extracts just the address, allowing you to identify the source host of an SNMP trap. Useful for log parsing, network monitoring, and alert correlation tasks.