javascript - How to use Regular Expression on lotus script? -


my coding in javascript, use check on malaysian identity card no:

sample malaysian identity card : 901011-13-6725

    var myic = @left(@trim(document1.getvalue("nric")),14)          if(myic!=null)         {               var re = /([0-9][0-9])((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\-([0-9][0-9])\-([0-9][0-9][0-9][0-9])/;               if (re.test(document1.getvalue("nric")))              {                document1.setvalue("comment", valid nric)             }             else             {                document1.setvalue("comment", not valid nric)             } 

if want use lotus script write regex, got method it?

either have @ method "like" or see http://lekkimworld.com/2005/09/25/using_regular_expressions_from_lotusscript.html
or use ls2j
https://openntf.org/main.nsf/project.xsp?r=project/regular%20expressions%20for%20lotusscript/


Comments