Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » .net » lookahead
  • Re: Length of an Email

    docdawson:  ^(\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*){n,20}$ Doesn't this just match n to 20 e-mail addresses? I understand carlosaml wants addresses with no more than 20 characters. The shortest possible address that will match the pattern above has 5 characters (a@b.c). To check for 5 to 20 characters one would have to use a ...
    Posted to Construction Advice (Forum) by eSquire on May 8, 2007
  • Re: please suggest me the regex for this piece

    This pattern might do what you need.  (?ms)(?<=^(TO|INFO)\s).*?(?=\s+^(?:INFO|GR)\s) It will only work reliably if there are no two other lines starting with TO, INFO or GR in the message body, i.e. after the first GR. It will return one or two matches, depending on the presence of the INFO part.  You will have to split those ...
    Posted to Construction Advice (Forum) by eSquire on May 4, 2007