Index: compile_rules_js_convert.py ================================================================== --- compile_rules_js_convert.py +++ compile_rules_js_convert.py @@ -44,14 +44,10 @@ sCode = sCode.replace(".rstrip", ".gl_trimRight") sCode = sCode.replace('.replace("."', r".replace(/\./g") sCode = sCode.replace('.replace("..."', r".replace(/\.\.\./g") sCode = re.sub(r'.replace\("([^"]+)" ?,', ".replace(/\\1/g,", sCode) # regex - #sCode = re.sub('re.search\\("([^"]+)", *(m.group\\(\\d\\))\\)', "(\\2.search(/\\1/) >= 0)", sCode) - #sCode = re.sub(".search\\(/\\(\\?i\\)([^/]+)/\\) >= 0\\)", ".search(/\\1/i) >= 0)", sCode) - #sCode = re.sub('(look\\(sSentence0?[][.a-z0-9:()"+-]*), "\\(\\?i\\)([^"]+)"', "\\1, /\\2/i", sCode) - #sCode = re.sub('(look\\(sSentence0?[][.a-z0-9:()"+-]*), "([^"]+)"', "\\1, /\\2/", sCode) sCode = re.sub('m\\.group\\((\\d+)\\) +in +(a[a-zA-Z]+)', "\\2.has(m[\\1])", sCode) sCode = re.sub('(lToken\\S+) +in +(a[a-zA-Z]+)', "\\2.has(\\1)", sCode) # slices sCode = sCode.replace("[:m.start()]", ".slice(0,m.index)") sCode = sCode.replace("[m.end():]", ".slice(m.end[0])")