Regex in LotusScript
After more than 10 years coding, I still learn something new on Lotus.
I need to do some checking on certain value, so regex came into mind. So far I haven’t actually used regex in LotusScript. A simple search give me result to use “Like” operator. It function similar with regex, and determines whether a string expression matches a pattern string.
I need to check if a value of a field contains only “0000”. The example syntax that can be used is as below
Dim subject List As String subject(0) = "000000" subject(1) = "100000" subject(2) = "000001" subject(3) = "000300" subject(4) = "asdf" subject(5) = "ZASE" subject(6) = "Z00000" ForAll s In subject If (s Like "*[1-9a-zA-Z]*") Then ' contains other than 0 Else ' contains only 0 End If End ForAll