Verified Commit 4e086a94 authored by Camil Staps's avatar Camil Staps 🚀

Update example.icl

parent 8863f251
......@@ -34,15 +34,10 @@ The following regex features are supported:
## Example (`example.icl`)
```clean
import StdEnv
import Data.Functor
import Data.Maybe
import Data.Tuple
import Regex
Start = map (appSnd toString) <$> flip match input <$> compile rgx
Start = map (appSnd3 toString o (appThd3 $ map (appSnd toString)))
<$> flip match input <$> compile rgx
where
rgx = ['[a-zA-Z\\d][\\w\\.%+-]*@(?:[a-zA-Z\\d-]+\\.)+[a-zA-Z]{2,}']
rgx = ['^([a-zA-Z\\d][\\w\\.%+-]*)@([a-zA-Z\\d-]+\\.)+[a-zA-Z]{2,}']
input = ['info@camilstaps.nl']
```
......
module example
import StdEnv
import Data.Error
from Data.Func import $
import Data.Functor
import Data.Maybe
import Data.Tuple
import Regex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment