I am trying to recognize Email ids and SSNs in files using elastic search.
Could somebody tell me the correct regexp patterns to recognize SSN and Email ids.
I am using these below patterns:
Email: "[a-zA-Z0-9]+@[a-zA-Z]+.[a-zA-Z]+"
SSN: "[0-9]{3}-?[0-9]{2}-?[0-9]{4}"
you could try using a grok processor and use the EMAILADDRESS pattern, so you don't need to write the regex yourself. Not too sure about the SSN though, if there is a predefined regex.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.