def __init__(self):
    JSBASE.__init__(self)
    self.rules = []
    for rule in DO.split('\n'):
        if (rule.strip() == ''):
            continue
        if rule.strip().startswith('#'):
            continue
        (cmd, from_, to_) = rule.split('|')
        if (cmd.lower().strip() == 'ri'):
            self.rules.append(ReplaceIgnoreCase(from_, to_))
        elif (cmd.lower().strip() == 'r'):
            self.rules.append(ReplaceNormal(from_, to_))
        else:
            raise j.exceptions.Base(('unknown rule:%s' % rule))
def __init__(self):
    JSBASE.__init__(self)
    self.rules = []
    for rule in DO.split('\n'):
        if (rule.strip() == ):
            continue
        if rule.strip().startswith('#'):
            continue
        (cmd, from_, to_) = rule.split('|')
        if (cmd.lower().strip() == 'ri'):
            self.rules.append(ReplaceIgnoreCase(from_, to_))
        elif (cmd.lower().strip() == 'r'):
            self.rules.append(ReplaceNormal(from_, to_))
        else:
            raise j.exceptions.Base(('unknown rule:%s' % rule))