Test, validate and match regular expressions
This regular expression is designed to match URLs pointing to Facebook groups. It accommodates optional HTTP or HTTPS protocols, optional 'www' subdomains, and the base 'facebook.com/group' or 'facebook.com/groups' path. Furthermore, it allows for optional numeric group IDs or trailing path segments, making it useful for validating and extracting social media links from multiline text.