include("import") func doSearch() fvar(i,l,m,s,u,x,f,r,c,ts) need_re() ts = TargetString i = (isndef(IgnoreCase)?' | re.IGNORECASE':'') l = (isndef(Locale)?' | re.LOCALE':'') m = (isndef(Multiline)?' | re.MULTILINE':'') s = (isndef(DotAll)?' | re.DOTALL':'') u = (isndef(Unicode)?' | re.UNICODE':'') x = (isndef(Verbose)?' | re.VERBOSE':'') f = 0 && i && l && m && s && u && x if (expof(RegEx) != PyREx) c = match && ' = re.search(' && RegEx && ', ' else c = match && ' = ' && RegEx && '.search(' end c = c && ts && ', ' && f && ')' println(c) println('if (' && match && '):') block.inclvl() event(onMatch, (match && '.groups()')@PyList) block.declvl() if (linked(onNotFound)) println('else:') block.inclvl() event(onNotFound, ts) block.declvl() end end func doMatch(_data) fvar(i,l,m,s,u,x,f,c,r,ts) need_re() ts = TargetString i = (isndef(IgnoreCase)?' | re.IGNORECASE':'') l = (isndef(Locale)?' | re.LOCALE':'') m = (isndef(Multiline)?' | re.MULTILINE':'') s = (isndef(DotAll)?' | re.DOTALL':'') u = (isndef(Unicode)?' | re.UNICODE':'') x = (isndef(Verbose)?' | re.VERBOSE':'') f = 0 && i && l && m && s && u && x if (expof(RegEx) != PyREx) c = match && ' = re.match(' && RegEx && ',' else c = match && ' = ' && RegEx && '.match(' end c = c && ts && ', ' && f && ')' println(c) println('if (' && match && '):') block.inclvl() event(onMatch, (match && '.groups()')@PyList) block.declvl() if (linked(onNotFound)) println('else:') block.inclvl() event(onNotFound) block.declvl() end end func doFindAll(_data) fvar(i,l,m,s,u,x,f,c,ts) need_re() ts = TargetString i = (isndef(IgnoreCase)?' | re.IGNORECASE':'') l = (isndef(Locale)?' | re.LOCALE':'') m = (isndef(Multiline)?' | re.MULTILINE':'') s = (isndef(DotAll)?' | re.DOTALL':'') u = (isndef(Unicode)?' | re.UNICODE':'') x = (isndef(Verbose)?' | re.VERBOSE':'') f = 0 && i && l && m && s && u && x if (expof(RegEx) != PyREx) c = match && ' = re.findall(' && regEx && ', ' else c = match && ' = ' && RegEx && '.findall(' end c = c && ts && ', ' && f && ')' println(c) println('if (' && match && '):') block.inclvl() event(onMatch, (match)@PyList) block.declvl() if (linked(onNotFound)) println('else:') block.inclvl() event(onNotFound) block.declvl() end end func MatchR return((match)@PyMatch) end func Results return((match && '.groups()')@PyList) end