I have a simple regex that detects 'domain.com' email addresses in any of the following formats:
user@domain.com
user.one@domain.com
user_one@domain.com
user-one@domain.com
The regex that makes this work for me is written as:
\b([a-z0-9_\.-]+)@domain.com
This expression will detect and match the first occurence of any of the above.
However, I'd like the regex to match only after, let's say, 10 occurences are detected.
For example, a user submits a document that contains 5 email addresses in the document. In this scenario, the expression should ignore the document. However, if the user submits a document with 10 or more email addresses in the document, then the expression should detect this.
I've tried a myriad of possible solutions using the {10,} quantifier, some of them examples taken from this site, but I'm thinking that it has something to do with the way I'm grouping the expression that is causing it to fail.
Your assistance will be greatly appreciated.