1. A method for string matching, comprising: accepting an input regular expression comprising one or more nested references to respective referenced regular expressions; replacing the nested references in the input regular expression with the respective referenced regular expressions, so as to provide a modified regular expression that does not contain a reference to another regular expression; and matching the modified regular expression to a target string.
1. A method for string matching, comprising: accepting an input regular expression comprising one or more nested references to respective referenced regular expressions; replacing the nested references in the input regular expression with the respective referenced regular expressions, so as to provide a modified regular expression that does not contain a reference to another regular expression; and matching the modified regular expression to a target string. 2. The method according to claim 1 , wherein replacing the nested references comprises representing the input regular expression using a character string, in which each of the nested references is represented by a pointer comprising at least one dedicated pointer character followed by a reference name.