Regular Expressions 101

Community Patterns

Facebook IDs


Regular Expression
Java 8



A general regular expression that uses the keywords 'Facebook' and 'id' to collect strings that contain Facebook IDs. Also, added an additional condition to where if there's a long numeric string it will be match a group given that, 'Facebook' is within the string. This is a special use-case and can be removed, I believe group 2.

Submitted by loganmcampbell - 2 years ago