Re: Another Regex question.

2003-07-23 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Sara wrote: > $TS = "THIS INPUT IS IN ALL CAPS"; > > $TS_cont = lc $TS; > > $TS now prints out "this input is in all caps" > > What If I want first letter in caps for every word in string? which should > be "This Input Is In All Caps" > > TIA, > > Sara. perldo

Re: Another Regex question.

2003-07-23 Thread drieux
On Wednesday, Jul 23, 2003, at 09:58 US/Pacific, Sara wrote: $TS = "THIS INPUT IS IN ALL CAPS"; $TS_cont = lc $TS; $TS now prints out "this input is in all caps" What If I want first letter in caps for every word in string? which should be "This Input Is In All Caps" a way of solving this woul

RE: Another Regex question.

2003-07-23 Thread wiggins
". > > $TS =~ s/(\w+)/ucfirst lc $1/ge; > > Scott > > -Original Message- > From: Sara [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 12:59 PM > To: org > Subject: Another Regex question. > > > $TS = "THIS INPUT IS IN ALL CA

RE: Another Regex question.

2003-07-23 Thread Scot Robnett
other Regex question. $TS = "THIS INPUT IS IN ALL CAPS"; $TS_cont = lc $TS; $TS now prints out "this input is in all caps" What If I want first letter in caps for every word in string? which should be "This Input Is In All Caps" TIA, Sara. -- To unsubsc

RE: Another Regex question.

2003-07-23 Thread wiggins
On Wed, 23 Jul 2003 21:58:52 +0500, "Sara" <[EMAIL PROTECTED]> wrote: > $TS = "THIS INPUT IS IN ALL CAPS"; > > $TS_cont = lc $TS; > > $TS now prints out "this input is in all caps" > > What If I want first letter in caps for every word in string

RE: Another Regex question.

2003-07-23 Thread Scot Robnett
ww.mawebcenters.com/insite2000 -Original Message- From: Sara [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 11:59 AM To: org Subject: Another Regex question. $TS = "THIS INPUT IS IN ALL CAPS"; $TS_cont = lc $TS; $TS now prints out "this input is in all caps" Wha

RE: Another Regex question.

2003-07-23 Thread Hall, Scott
Sara, You can use "ucfirst". $TS =~ s/(\w+)/ucfirst lc $1/ge; Scott -Original Message- From: Sara [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 12:59 PM To: org Subject: Another Regex question. $TS = "THIS INPUT IS IN ALL CAPS"; $TS_cont = lc $TS;

Another Regex question.

2003-07-23 Thread Sara
$TS = "THIS INPUT IS IN ALL CAPS"; $TS_cont = lc $TS; $TS now prints out "this input is in all caps" What If I want first letter in caps for every word in string? which should be "This Input Is In All Caps" TIA, Sara.

RE: Another regex question

2003-05-30 Thread Scot Robnett
Andrew, Thanks for trying to help. Scot -Original Message- From: Andrew Brosnan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 3:05 PM To: Scot Robnett; [EMAIL PROTECTED] Subject: RE: Another regex question Try this: #!/usr/bin/perl #File: use warnings; use strict; #set

RE: Another regex question

2003-05-30 Thread Andrew Brosnan
Try this: #!/usr/bin/perl #File: use warnings; use strict; #set slurp mode undef $/; my $stuff_i_want; while () {#read in your file #match up to Today's Headlines (or whatever) if (/Today's Headlines:<\/strong>/) { $stuff_i_want = $'; #put the rest in $stuff_i_want }

RE: Another regex question

2003-05-30 Thread Scot Robnett
.. -Original Message- From: Andrew Brosnan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 1:45 PM To: Scot Robnett; [EMAIL PROTECTED] Subject: RE: Another regex question On 5/29/03 at 12:27 PM, [EMAIL PROTECTED] (Scot Robnett) wrote: Will the file always be formated as below (wi

RE: Another regex question

2003-05-30 Thread Andrew Brosnan
On 5/29/03 at 12:27 PM, [EMAIL PROTECTED] (Scot Robnett) wrote: Will the file always be formated as below (with the blank line between articles)? If so you could set the record separator '$/' to paragraph mode to read each of them in: # $/; #default is newline # $/ = ""; # paragraph mode

RE: Another regex question

2003-05-30 Thread Scot Robnett
I read perlfaq6. Several times, in fact, and specifically the section you're pointing out. I'm one of those people who needs a good beating to understand something, but once I "get it" I don't forget...just not there yet. I basically want to extract the first several lines of the file, maybe to di

Re: Another regex question

2003-05-30 Thread Andrew Brosnan
On 5/29/03 at 11:22 AM, [EMAIL PROTECTED] (Scot Robnett) wrote: > Okay, > > I've looked at perlre, perlretut, perldoc.com, Learning Perl, and a > partridge in a pear tree, and I'm still stupid. :) > > Does anyone out there have a working example script that does > matching over multiple lines, p

Another regex question

2003-05-30 Thread Scot Robnett
Okay, I've looked at perlre, perlretut, perldoc.com, Learning Perl, and a partridge in a pear tree, and I'm still stupid. :) Does anyone out there have a working example script that does matching over multiple lines, preferably an HTML file? I'm just having a lot of difficulty with this and it wo