Regular Expression newbie

Discussion in 'Perl Misc' started by matpublic@ntlworld.com, May 10, 2005.

  1. Guest

    Can anyone give me pointers to a good site to explain how to use
    regular expressions?

    I'm after a several expressions (the simplest) to ensure that an
    account number entered is valid...i.e. if the prefix was 123456
    followed by a '/' and eight digits.

    123456/12345678
    123456/83838383

    However, regular expressions aren't too easy for the newbie to follow
    so any good 'start here' sites will be welcome.

    Many thanks.
     
    , May 10, 2005
    #1
    1. Advertising

  2. wrote :
    > Can anyone give me pointers to a good site to explain how to use
    > regular expressions?


    Check out these two:

    http://perldoc.perl.org/perlrequick.html
    http://perldoc.perl.org/perlretut.html

    You can also access them by typing

    perldoc perlrequick

    and

    perldoc perlretut

    HTH
    Best regards
    Martin

    --
    perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    [29,77,98,111,105,29],[100,93,95,103,97,110]];
    for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
     
    Martin Kissner, May 10, 2005
    #2
    1. Advertising

  3. / 123456 \/ \d{8} / would be a regex you could use
     
    crazyForDynamite, May 11, 2005
    #3
  4. Anno Siegel Guest

    crazyForDynamite <> wrote in comp.lang.perl.misc:

    > / 123456 \/ \d{8} / would be a regex you could use


    Not without an /x modifier.

    Anno
     
    Anno Siegel, May 11, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,389
  2. Lee
    Replies:
    6
    Views:
    367
    Alan Moore
    Oct 14, 2003
  3. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    884
    Alan Moore
    Dec 2, 2005
  4. GIMME
    Replies:
    3
    Views:
    12,050
    vforvikash
    Dec 29, 2008
  5. googleboy
    Replies:
    6
    Views:
    349
    Paul McGuire
    Sep 23, 2005
Loading...

Share This Page