Title: Regular expression question
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Cai, Lucy (L.)Sent: Monday, July 31, 2006 17:21To:
Cai, Lucy (L.); perl-win32-users@listserv.ActiveState.com;
perl-unix-users@listserv.ActiveState.com;
[EMAIL PROTECTED];
[EMAIL PROTECTED]Sub
Title: Regular expression question
Try something like:
my ($dir , $filename) = $file=
~ /^(.*?)\\([^\\]*?)$/ ;
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of<
/B>Cai, Lucy (L.)Sent: Monday, July 31, 2006 8:21 PMTo:
Cai, Lucy (L.); perl-win32-users@listserv.ActiveSt
Title: Regular expression question
I have a file such as:
My $file = "c:\temp\zips\ok.txt";
How can I split the $file to get the only path:
My $dir = "c:\temp\zips";
My $file = "ok.txt";
Thanks in advance!
Lucy
___
Perl-Unix-Users mail
Title: Regular expression question
I have a file such as:
My $file = "c:\temp\zips\ok.txt";
How can I split the $file to get the only path:
My $dir = "c:\temp\zips";
My $file = "ok.txt";
Thanks in advance!
Lucy
___
Perl-Unix-Users ma
On Apr 26, 2006, at 22:50, $Bill Luebkert wrote:
or simpler if you just are interested in ucmvob being present:
return $Output =~ /ucmvob/ ? 1 : 0;
Or to make sure that it is not a substring within another "word":
return $Output =~ /\bucmvo\b/ ? 1 : 0;
The "\b" will match at
Cai, Lucy (L.) wrote:
> Hi, all,
>
> I have a question about regular expression:
>
> my code is like this:
> **
> sub IsPVob
> {
> my ($Vob) = @_;
>
> my $Output = `cleartool lsvob $Vob`;
> die "IsPVob
Title: Counting words
Hi, all,
I have a question about regular
_expression_:
my code is like this:
**
sub
IsPVob{ my ($Vob) =
@_;
my $Output =
`cleartool lsvob $Vob`; die
"IsPVob can't list vob $
Title: Regular Expression Question
I hope something like this would help. You can store values
in array and then use the array for any other operations.
my
@values;
$string =
'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv';
while
($string =~ /XX(\(\w+\))XX/gi)
{
Jason Vincent wrote:
>
> If I have a pattern that appears mulitple times (but I don't know how
> many times) in a string, how do I get at the matched text for each of
> the matches?
>
> Made up example…
>
> $string = 'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv';
>
> If ($string =~
On 3/2/06, Jason Vincent <[EMAIL PROTECTED]> wrote:
>
>
>
> If I have a pattern that appears mulitple times (but I don't know how many
> times) in a string, how do I get at the matched text for each of the
> matches?
>
> Made up example…
>
> $string =
> 'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX
Title: Regular Expression Question
If I have a pattern that appears mulitple times (but I don't know how many times) in a string, how do I get at the matched text for each of the matches?
Made up example…
$string = 'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv';
If ($string =
11 matches
Mail list logo