Format 1: regexm(,regular expression)
Format 2: regexmw(,regular expression)
Return true if the regular expressions matches the whole character string . Use regexmw function if multibyte characters exists in
or regular expression, or characters in Shift_JIS encoding does not correspond to search results.
Both records where id=1,id=2 contains regular expression beginning with c and ends with aa, in record id=2, there is only partial match (matches from c at the second position to the end) with the regular expression.
$ more dat1.csv id,str 1,caabaa 2,acabaaa 3, 4,bbcbcc $ mcal c='regexm($s{str},"c.*aa")' a=rsl i=dat1.csv o=rsl1.csv #END# kgcal a=rsl c=regexm($s{str},"c.*aa") i=dat1.csv o=rsl1.csv $ more rsl1.csv id,str,rsl 1,caabaa,1 2,acabaaa,0 3,,0 4,bbcbcc,0
The full string in column that matches the regular expression .*c is only found in the record where id=4.
$ mcal c='regexm($s{str},".*c")' a=rsl i=dat1.csv o=rsl2.csv #END# kgcal a=rsl c=regexm($s{str},".*c") i=dat1.csv o=rsl2.csv $ more rsl2.csv id,str,rsl 1,caabaa,0 2,acabaaa,0 3,,0 4,bbcbcc,1
Match the blank characters at id=3 using the regular expression ^$.
$ mcal c='regexm($s{str},"^$")' a=rsl i=dat1.csv o=rsl3.csv #END# kgcal a=rsl c=regexm($s{str},"^$") i=dat1.csv o=rsl3.csv $ more rsl3.csv id,str,rsl 1,caabaa,0 2,acabaaa,0 3,,1 4,bbcbcc,0