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; $TS now prints out this

RE: Another Regex question.

2003-07-23 Thread Scot Robnett
#!/usr/bin/perl -w my $TS = THIS INPUT IS IN ALL CAPS; my $lc_ts = lc($TS); my @words = split(/\s+/, $lc_ts); my @letters = (); foreach my $word(@words) { chomp($word); if($word =~ /^(\w{1})(\w*)/) { print uc($1) . $2 . ; } else { die Something is seriously wrong here...; } } #

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? which should

RE: Another regex question

2003-05-30 Thread Scot Robnett
- 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 (with the blank line between

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