[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] perl regex.... again
- Subject: [ale] perl regex.... again
- From: John.Scott at peak10.com (John Scott)
- Date: Mon, 28 Feb 2011 20:40:08 -0500
- In-reply-to: <[email protected]>
- References: <[email protected]>
Geoffrey Wrote:
> I'm trying to come up with a perl regex that will identify a line of data that has any
> character outside of alphanumeric, punctuation, spaces, tabs.
Taking a crack:
"if ($line !~ /[\d\s\w\\\|\(\)\[\{\^\$\*\+\?\.\<\>,:\;"']/) {
}"
Basically it's just the "if ($line !~ /[\d\s\w]/)" part, but adding all the punctuation you need.
The punctuation is the hard part. The rest is easy, as you know.
I have not tested this before sending. This is just a quick crack at it.
-John
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Geoffrey Myers
Sent: Monday, February 28, 2011 12:59 PM
To: Atlanta Linux Enthusiasts
Subject: [ale] perl regex.... again
I'll try this again as I didn't get any bites before. I'm trying to
come up with a perl regex that will identify a line of data that has any
character outside of alphanumeric, punctuation, spaces, tabs.
Can't seem to formulate.
anyone?
--
Until later, Geoffrey
"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo