1 USING: kernel regexp tools.test ;
5 <verbexp> something >regexp
7 [ "a" swap matches? ] bi
11 "what" <verbexp> anything >regexp matches?
15 <verbexp> start-of-line "w" anything-but >regexp
16 [ "what" swap matches? ]
17 [ "time" swap matches? ] bi
21 <verbexp> "a" something-but >regexp
24 [ "a" swap matches? ] tri
28 <verbexp> start-of-line "a" then >regexp
30 [ "ba" swap matches? ] bi
34 <verbexp> "a" then end-of-line >regexp
36 [ "ab" swap matches? ] bi
40 <verbexp> start-of-line "a" then "b" maybe >regexp
41 [ "acb" swap re-contains? ]
42 [ "abc" swap re-contains? ] bi
46 <verbexp> start-of-line "a" then "xyz" any-of >regexp
47 [ "ay" swap matches? ]
48 [ "abc" swap matches? ] bi
52 <verbexp> start-of-line "abc" then -or- "def" then >regexp
53 [ "defzz" swap re-contains? ]
54 [ "xyzabc" swap re-contains? ] bi
58 <verbexp> start-of-line "abc" then line-break "def" then >regexp
59 [ "abc\r\ndef" swap matches? ]
60 [ "abc\ndef" swap matches? ]
61 [ "abc\r\n def" swap matches? ] tri
65 <verbexp> start-of-line tab "abc" then >regexp
66 [ "\tabc" swap matches? ]
67 [ "abc" swap matches? ] bi
70 { f } [ "A" <verbexp> start-of-line "a" then >regexp matches? ] unit-test
72 <verbexp> start-of-line "a" then case-insensitive >regexp
74 [ "a" swap matches? ] bi
80 "https://www.google.com"