The Regex Extractor is a simple HTTP server that will process a text input and provide a simple collection of label subsets that match configured regular expressions.
Once the application is built, there are two command line flags:
- -addr: The address on which the HTTP server will be bound
- -file: The CSV containing the labels and patterns
Example:
regexextractor -file ./sample.csv
Example Call:
curl http://localhost:8080 -d 'Bill Gates bill@ms.com'
Example Output:
{"email":["bill@ms.com"],"name":["Bill","Gates"]}
- Use github.com/spf13/cobra to handle command line arguments
- Update the build to set to embed a version
- Configure the application to use TLS