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
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
".
>
> $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
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
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
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
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 = "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.
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
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
}
..
-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
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
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
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
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
15 matches
Mail list logo