regex - Regular Expression to match a number followed by that many characters? -
i match strings follow pattern: "n: n-character-string"
valid examples:
5. fives 12. abcdabcdabcd 1. o 0. 3. tre
is there way accomplish single regex? i'm happy accept flavor of regular expression.
no can't regex.
finite automation (underlying data structure used regex) has no support memory. is, on lexical analysis done regex, input broken down tokens , can not use token previous stage used further parsing on later stage.
read theory of automata more theoretical background this.
Comments
Post a Comment