A Reg-exp compendium of frequently occuring matches?

Discussion in 'Perl Misc' started by Mark Day, Nov 1, 2004.

  1. Mark Day

    Mark Day Guest

    I was wondering if anyone out there had compiled a list
    of regular expressions for tasks that occur frequently such as
    stripping out HTML tags, validating IP addresses, etc.
    Is there anything like this around? If there's a link for something like
    that, it would be very handy and helpful, thanks in advance.
     
    Mark Day, Nov 1, 2004
    #1
    1. Advertising

  2. Mark Day

    Simon Taylor Guest

    Mark Day wrote:
    > I was wondering if anyone out there had compiled a list
    > of regular expressions for tasks that occur frequently such as
    > stripping out HTML tags, validating IP addresses, etc.
    > Is there anything like this around? If there's a link for something like
    > that, it would be very handy and helpful, thanks in advance.
    >


    Search for regexp at http://search.cpan.org and you'll see plenty
    of examples under the Regexp::Common namespace.

    Probably the best starting point is here:

    http://search.cpan.org/~abigail/Regexp-Common-2.117/lib/Regexp/Common.pm


    Regards,


    Simon Taylor
     
    Simon Taylor, Nov 1, 2004
    #2
    1. Advertising

  3. >>>>> "MD" == Mark Day <> writes:

    MD> I was wondering if anyone out there had compiled a list of
    MD> regular expressions for tasks that occur frequently such as
    MD> stripping out HTML tags, validating IP addresses, etc.

    Both of those are extremely poor uses for regular expressions.

    MD> Is there anything like this around? If there's a link for
    MD> something like that, it would be very handy and helpful,
    MD> thanks in advance.

    http://search.cpan.org.

    To validate an IP address, Validate::Net.

    To strip HTML tags, HTML::Strip.

    For generic common regular expressions, Regex::Common.

    Charlton


    --
    cwilbur at chromatico dot net
    cwilbur at mac dot com
     
    Charlton Wilbur, Nov 1, 2004
    #3
  4. Mark Day

    Mark Day Guest

    Simon Taylor wrote:
    > Mark Day wrote:
    >
    >> I was wondering if anyone out there had compiled a list
    >> of regular expressions for tasks that occur frequently such as
    >> stripping out HTML tags, validating IP addresses, etc.
    >> Is there anything like this around? If there's a link for something
    >> like that, it would be very handy and helpful, thanks in advance.
    >>

    >
    > Search for regexp at http://search.cpan.org and you'll see plenty
    > of examples under the Regexp::Common namespace.
    >
    > Probably the best starting point is here:
    >
    > http://search.cpan.org/~abigail/Regexp-Common-2.117/lib/Regexp/Common.pm
    >
    >
    > Regards,



    That's great, thanks.
    Looks like there are many such common tasks that could be added here.
     
    Mark Day, Nov 1, 2004
    #4
  5. Mark Day

    Mark Day Guest

    Abigail wrote:
    > Mark Day () wrote on MMMMLXXX September MCMXCIII in
    > <URL:news:>:
    > `'
    > `'
    > `' Simon Taylor wrote:
    > `' > Mark Day wrote:
    > `' >
    > `' >> I was wondering if anyone out there had compiled a list
    > `' >> of regular expressions for tasks that occur frequently such as
    > `' >> stripping out HTML tags, validating IP addresses, etc.
    > `' >> Is there anything like this around? If there's a link for something
    > `' >> like that, it would be very handy and helpful, thanks in advance.
    > `' >>
    > `' >
    > `' > Search for regexp at http://search.cpan.org and you'll see plenty
    > `' > of examples under the Regexp::Common namespace.
    > `' >
    > `' > Probably the best starting point is here:
    > `' >
    > `' > http://search.cpan.org/~abigail/Regexp-Common-2.117/lib/Regexp/Common.pm
    > `' >
    > `' >
    > `' > Regards,
    > `'
    > `'
    > `' That's great, thanks.
    > `' Looks like there are many such common tasks that could be added here.
    > `'
    >
    >
    > Patches welcome.



    As soon as my skills are that far along, I'd be happy to.
     
    Mark Day, Nov 1, 2004
    #5
    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. Andrew Rowland

    Reg exp: matching relative path only.

    Andrew Rowland, Aug 2, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,155
    Andrew Rowland
    Aug 2, 2003
  2. psk

    Newbie-Reg Exp

    psk, Jan 16, 2004, in forum: Perl
    Replies:
    2
    Views:
    1,374
    Gunnar Hjalmarsson
    Jan 19, 2004
  3. PerlE

    Reg Exp Help

    PerlE, Jan 30, 2004, in forum: Perl
    Replies:
    0
    Views:
    516
    PerlE
    Jan 30, 2004
  4. Ken Chesak

    reg exp

    Ken Chesak, Aug 26, 2004, in forum: Perl
    Replies:
    0
    Views:
    634
    Ken Chesak
    Aug 26, 2004
  5. Ken Chesak

    reg exp

    Ken Chesak, Aug 30, 2004, in forum: Perl
    Replies:
    5
    Views:
    660
Loading...

Share This Page