Re: reg exp match

2001-09-24 Thread Jarrod Overson
- Original Message - From: "David Draley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 24, 2001 8:13 AM Subject: reg exp match > How would I print only the words that contain the letter "p" in a file??? > Right now I am only

Re: reg exp match

2001-09-24 Thread Curtis Poe
--- David Draley <[EMAIL PROTECTED]> wrote: > How would I print only the words that contain the letter "p" in a file??? > Right now I am only printing the entire lines that contain words with the > letter "p". > > while () > { > if(/[p]/) >

reg exp match

2001-09-24 Thread David Draley
How would I print only the words that contain the letter "p" in a file??? Right now I am only printing the entire lines that contain words with the letter "p". while () { if(/[p]/) { print "$_";

Fwd: RE: reg exp

2001-09-20 Thread Curtis Poe
> while () { > print if /[.?]$/; > } > __DATA__ > This is a test. > Is this another test? > This doesn't print! That character class should have been "[.,?]", since a comma was apparently desired. Also, the dot, comma, and question mark do not need to be escaped i

RE: reg exp

2001-09-20 Thread Curtis Poe
> -Original Message- > From: David Draley [mailto:[EMAIL PROTECTED]] > Sent: September 20, 2001 12:35 > To: [EMAIL PROTECTED] > Subject: reg exp > > hello - > > I am trying to search a for any sentence that ends in "." or "?" I >

RE: reg exp

2001-09-20 Thread David Draley
print "$_" if /\.\?$/; # the only the last character of the >line is a <.,?> ! > } > >hope this give you some ideas ... > >-Original Message- >From: David Draley [mailto:[EMAIL PROTECTED]] >Sent: September 20, 2001 12:35 >To: [EMAIL PR

RE: reg exp

2001-09-20 Thread Moon, John
-Original Message- From: David Draley [mailto:[EMAIL PROTECTED]] Sent: September 20, 2001 12:35 To: [EMAIL PROTECTED] Subject: reg exp hello - I am trying to search a for any sentence that ends in "." or "?" I want to only print those sentences that end w

reg exp

2001-09-20 Thread David Draley
hello - I am trying to search a for any sentence that ends in "." or "?" I want to only print those sentences that end with "." or "?" I am having trouble with the reg expression syntax... -- while () { $file=; if(/\.\?$/){ print "$only_sentences_that_end

RE: Reg Exp problem

2001-08-08 Thread Dianne Van Dulken
I've got this working nicely now. The data was being called by ENV('QUERY_STRING'), which was causing most of the troubles. Thank you very much to Michael and Bradley for their help Cheers Di > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Reg Exp problem

2001-08-08 Thread Dianne Van Dulken
> From your example, it appears that you simply need to parse a > URL-encoded > string. For that, you could use this regex, which uses the chr and hex > functions to translate URL-encoded characters: > > $string =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; Is this better than $string =~ s/%(..

Re: Reg Exp problem

2001-08-08 Thread Michael Kelly
On 8/8/01 7:08 PM, Dianne Van Dulken wrote: > Hi All, > > I am having a little trouble with a regexp and I was hoping I might get a > hint towards a module or something like that. > > I get a query string passed to me, that I need to record in a database. A > typical one might look like this:

Reg Exp problem

2001-08-08 Thread Dianne Van Dulken
Hi All, I am having a little trouble with a regexp and I was hoping I might get a hint towards a module or something like that. I get a query string passed to me, that I need to record in a database. A typical one might look like this: %3Cdel_phone%3E%28020%200202%2000202%3C/del_phone%3E