Results 1 to 3 of 3

Thread: [RESOLVED] Regex

  1. #1

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Resolved [RESOLVED] Regex

    I'm attempting to write a regex, but am failing miserably.
    This might be a very silly problem, but what I need is to match a string of at least one character and a max of 80.

    What I have now is:
    Code:
    /^.{1,80}/
    I'm confused.

    Thanks.
    Delete it. They just clutter threads anyway.

  2. #2
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: Regex

    Immediate thought that may be wrong - maybe you need an end-of-line signifier?
    Code:
    /^.{1,80}$/

  3. #3

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Regex

    Initially I had that.
    I was using RegexPal to test it.
    As it turns out it doesn't properly interpret the expression.
    Works like a charm in PHP

    Thanks
    Delete it. They just clutter threads anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width