Format 1: regexs(,regular expression)
Format 2: regexsw(,regular expression)
Return the starting position of the longest substring where the defined regular expression matches with part of the character string . Use the regexsw function if
or regular expression contain multibyte characters, or when characters in Shift_JIS encoding does not correspond to search results.
Records that contain the regular expression starting with c until aa includes id=1,id=2. The function returns true for matching records.
$ more dat1.csv id,str 1,caabaa 2,acabaaa 3, 4,cbcbcc $ mcal c='regexs($s{str},"c.*aa")' a=rsl i=dat1.csv o=rsl1.csv #END# kgcal a=rsl c=regexs($s{str},"c.*aa") i=dat1.csv o=rsl1.csv $ more rsl1.csv id,str,rsl 1,caabaa,1 2,acabaaa,1 3,,0 4,cbcbcc,0
The regular expression .*c which matches the value in the column for all records except id=3.
$ mcal c='regexs($s{str},".*c")' a=rsl i=dat1.csv o=rsl2.csv #END# kgcal a=rsl c=regexs($s{str},".*c") i=dat1.csv o=rsl2.csv $ more rsl2.csv id,str,rsl 1,caabaa,1 2,acabaaa,1 3,,0 4,cbcbcc,1