Add example that parses valid email addressed. #8
-
Email addresses can be tricky to handle with regex. I think an idiomatic example written with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There is a basic example here in the benchmarks (with regex comparison): dart-petitparser-examples/bin/benchmark/regexp_benchmark.dart Lines 57 to 63 in 58b3b47 The URL parser is probably a more complete example to extract e-mail addresses, but it requires the scheme: |
Beta Was this translation helpful? Give feedback.
-
Thank you @renggli this is a good example and what I am looking for 😄 |
Beta Was this translation helpful? Give feedback.
There is a basic example here in the benchmarks (with regex comparison):
dart-petitparser-examples/bin/benchmark/regexp_benchmark.dart
Lines 57 to 63 in 58b3b47
The URL parser is probably a more complete example to extract e-mail addresses, but it requires the scheme:
mailto://[email protected]
. Maybe you can start there?