jan tolenaar / kiezellisp / index-of-everything

Name

about:regular-expressions

Description

Standard regular expression

make-html > #/aap/
it: #/aap/
make-html > :d
#s( :members #s( :match-timeout -00:00:00.0010000
                 :options None
                 :right-to-left false )
    :type "Kiezel.RegexPlus"
    :value #/aap/ )

make-html > (.regex-match "slaap" #/aap/)
it: ("aap")
make-html > #/(a*)(p)/i
it: #/(a*)(p)/i
make-html > :d
#s( :members #s( :match-timeout -00:00:00.0010000
                 :options IgnoreCase
                 :right-to-left false )
    :type "Kiezel.RegexPlus"
    :value #/(a*)(p)/i )

make-html > (.regex-match "SLAAp" #/(a*)(p)/i)
it: ("AAp" "AA" "p")

Regular expression options

i   RegexOptions.IgnoreCase
m   RegexOptions.Multiline
s   RegexOptions.Singleline
n   RegexOptions.ExplicitCapture
x   RegexOptions.IgnorePatternWhitespace
w   wildcard pattern

Regular expression from a wildcard pattern

make-html > #/*.k/w
it: #/^(.*?)\.k$/
make-html > (filter #/*.k/w '("a.k" "b.cs" "c.K"))
it: ("a.k")
make-html > (filter #/*.k/wi '("a.k" "b.cs" "c.K"))
it: ("a.k" "c.K")

Regular expression as a function

make-html > (filter #/aap/ '("slaap" "jaap" "teun" "mies" "jaap"))
it: ("slaap" "jaap" "jaap")