Hello Friends,
I am confused and hence coded a small RegEx statement.
I am now having more questions. Would appreciate, if
you can help:
Here is my code:
C:\>perl -e "$str = 'null knot';
$str=~m/(null(?!\s?not))/; print $+;"
The Output is:
null
Question 1: Should I not expect the full string '
Thanks Nikola and Bob.
Would "anchoring with \z" tantamount to having a
trailing "$"? In other words, are the following
expressions one and the same?
/^[0-9a-fA-F]+\z/
/^[0-9a-fA-F]+$/
__
Yahoo! - We Remember
9-11: A tribute to the more than 3
use strict;
while(){
chomp;
if(/[^0-9a-fA-F]+/){
print("$_ is not a hexadecimal number!\n");
}else{
print("$_ is a hexadecimal number!\n");
}
}
__DATA__
f4dxf
ffaa99
gxad
2832
2842da
--- Nikola Janceski <[EMAIL PROTECTED]>
wrote:
> give us a snippet of your code. you made a mist
ll the cases correctly, except for empty
strings. Hence the question.
Thanks,
Rex
--- Nikola Janceski <[EMAIL PROTECTED]>
wrote:
> see below
>
> /^[^0-9a-fA-F]+$/ #if this evals to true string is
> NOT
>
> ## start of string ^ and end of string $
>
> -Or
Here is a RegEx that I am using to check if the given
string is Hexadecimal or not.
/[^0-9a-fA-F]+/ #if this evals to true string is NOT
hex
I am having a trailing "+" to make sure at least one
permissible character is present. Yet, it matches an
empty string as a hex string.
a) What am I mis
Try Win32::Service.
Functions of interest are:
StopService($hostName, $svcName);
StartService($hostName, $svcName);
PauseService($hostName, $svcName);
ResumeService($hostName, $svcName);
You can execute any of the functions of this module on
remote-servers attached to the same network that you
uot;Kipp, James" wrote:you can also just use 'nbtstat -c'.
> -Original Message-
> From: RTO RTO [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 6:07 PM
> To: Timothy Johnson; 'Mark Richmond'; [EMAIL PROTECTED]
> Subject: RE: How to find
I am not sure if this would be inane to ask. But here is a dilemma:
I have three functions, ltrim, rtrim and trim. As the function names adumbrate, each
of them trims white-spaces -- the usual trimming stuff. Since, these functions do not
exist in Perl and of course I can club them together in
only named iterators.
Thanks,
Rex
Michael Fowler wrote:
On Mon, Sep 09, 2002 at 02:29:24PM -0700, RTO RTO wrote:
Out of curiousity, why do you prefer not to use a named iterator? They're
often more readable than the ever-implicit $_, especially if you end up
referring to the variable explicit
I ran this one-liner, and it did return all the
Windows NT/2000/Servers/Workstations attached to my
domain/workgroup.
C:\>perl -e "use Win32::NetAdmin; my($serverRef) = {};
Win32::NetAdmin::GetServers('', 'MYDOMAINNAME',
SV_TYPE_SERVER, $serverRef); while(my($key, $val) =
each %{$serverRef}){prin
Note: forwarded message attached.
__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--- Begin Message ---
Tim -- Thanks for your rejoinder.
Mostly, I do use 'aliased' variables within nested
loops. However, t
Friends:
I have an outerloop with a list and so do I have an
inner loop with another list.
$_ variable points to list in the outer-loop or
inner-loop depending upon the scope. I prefer to not
use aliases. In such a case, when I am in the scope of
inner loop, can I access the looping variable on
Friends:
I have an outerloop with a list and so do I have an
inner loop with another list.
$_ variable points to list in the outer-loop or
inner-loop depending upon the scope. I prefer to not
use aliases. In such a case, when I am in the scope of
inner loop, can I access the looping variable on
13 matches
Mail list logo