A Reg-exp compendium of frequently occuring matches?

M

Mark Day

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.
 
S

Simon Taylor

Mark said:
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
 
C

Charlton Wilbur

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
 
M

Mark Day

Abigail said:
Mark Day ([email protected]) wrote on MMMMLXXX September MCMXCIII in
<URL:`'
`'
`' 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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top