Thread

  1. Re: regular expression question

    wsheldah@lexmark.com — 2003-06-04T19:51:46Z

    Did you try the obvious:
    '^[0-9|, -]{0,10}$'
    
    
    
    Wes Sheldahl
    
    
    
    Joel Rodrigues <borgempath@Phreaker.net>@postgresql.org on 06/04/2003
    02:40:18 PM
    
    Sent by:    pgsql-general-owner@postgresql.org
    
    
    To:    pgsql-general@postgresql.org
    cc:
    Subject:    [GENERAL] regular expression question
    
    
    Hi,
    I'm trying to write a check on a column restricting the data to
    numerals from 0-9, commas,  dashes '-' and single spaces. To
    allow the entry of something like "134-140, 310-312".
    
    I seem to have got everything but the single spaces.
    
    '^[0-9|,-]{0,10}$'
    
    
    Hope you can help !
    
    Cheers,
    Joel