- "regexp" , , , "ä" (ae | ä) ", . javascript (, document.write(), ), ;
regexp_match("Grüße|Gruesse",somestring)
- :
mappings = (("ä","ae"),("ö","oe"),("ü","ue"))
def my_regexp_match(regexp,input) {
for key,value in mappings {
new_regexp = regexp.replace(key,"("+key+"|"+value+")")
}
regexp_match(new_regexp,input)
}
my_regexp_match("Grüße",somestring)
, "pythonic" - , , re.compile() javascript, - for -loop , my_regexp_match ( )