"Dharshana Eswaran" schreef:
> $xyz =~ /\s*(\w+)\s+(\w+);/;
> $b = $2; #variable name is stored here
>
> ...
>
> But the variables like pp_lac[COMMON_TYPE_MAX] and
> pp_plmn_list[COMMON_TYPE_MAX] are not getting stored because of the
> special character used inbetween the names.
The
Hi All,
I am trying to extract strings from few files. The content of the file reads
as shown
typedef struct
{
REFID_T pp_ref_id; /* destination */
CAUSE_T pp_cause;/* Reason registered */
STATE_T pp_state; /* State for indicators */
COMMON_TY
Dharshana Eswaran 写道:
Hi All,
I am trying to extract strings from few files. The content of the file
reads
as shown
typedef struct
{
REFID_T pp_ref_id; /* destination */
CAUSE_T pp_cause;/* Reason registered */
STATE_T pp_state; /* State for i
Of Course Rob, i always use strict and warnings... Since i had to write a
pseudocode, i did not write them. But i wil lsurely keep this in mind. :-)
Thank you... :-)
On 5/17/07, Rob Coops <[EMAIL PROTECTED]> wrote:
Sure, though I do not see why you would not want to use strict and
warnings (you
Dharshana Eswaran wrote:
Hi All,
I am trying to extract few strings from a text file. The pattern of
the text
stored in the file is as follows:
#define MNSS_FACILITY_IND_ID (TF_MNSS_MESSAGE_CATEGORY + 0x01)
/* @LOG
MNSS_MESSAGE_T */
I need to extract MNSS_FACILITY_IND_ID, TF_MNSS_ME
Subject: Regarding pattern matching
Hi All,
I am trying to extract few strings from a text file. The pattern of the
text
stored in the file is as follows:
#define MNSS_FACILITY_IND_ID (TF_MNSS_MESSAGE_CATEGORY + 0x01) /*
@LOG
MNSS_MESSAGE_T */
I need to extract MNSS_FACILITY_IND_ID
Sure, though I do not see why you would not want to use strict and warnings
(you should should should or the people on this list will hunt you down and
) anyway Data::Dumper was just there for convenience:
#!/usr/local/bin/perl
#use strict;
#use warnings;
my $string = '#define MNSS_FACILIT
Thank you But i want to try without using any perl modules. Can you
suggest some way with no modules used in that?
Thanks and Regards,
Dharshana
On 5/17/07, Rob Coops <[EMAIL PROTECTED]> wrote:
On 5/17/07, Rob Coops <[EMAIL PROTECTED]> wrote:
>
> How about this?
>
>
> #!/usr/local/bin/pe
On 5/17/07, Rob Coops <[EMAIL PROTECTED]> wrote:
How about this?
#!/usr/local/bin/perl
use strict;
use warnings;
my $string = '#define MNSS_FACILITY_IND_ID (TF_MNSS_MESSAGE_CATEGORY
+ 0x01) /* @LOG MNSS_MESSAGE_T */';
my @parts = $string =~ m/\s+?(\w+)\s+?\((\w+.*?)\)[EMAIL PROTECTED]
How about this?
#!/usr/local/bin/perl
use strict;
use warnings;
my $string = '#define MNSS_FACILITY_IND_ID (TF_MNSS_MESSAGE_CATEGORY +
0x01) /* @LOG MNSS_MESSAGE_T */';
my @parts = $string =~ m/\S+?(\w+)\s+?\((\w+.*?)\)[EMAIL PROTECTED](\w+).*/;
use Data::Dumper;
print Dumper @parts;
Hi All,
I am trying to extract few strings from a text file. The pattern of the text
stored in the file is as follows:
#define MNSS_FACILITY_IND_ID (TF_MNSS_MESSAGE_CATEGORY + 0x01) /* @LOG
MNSS_MESSAGE_T */
I need to extract MNSS_FACILITY_IND_ID, TF_MNSS_MESSAGE_CATEGORY + 0x01 and
MNSS
s "field vendno" where as before it was
"field" and @ARGV[3] was "vendno"
Make sense now?
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 1:04 PM
To: 'Michael Pastore'; '[EMAIL PROTECTED]
sday, February 20, 2002 12:45 PM
To: '[EMAIL PROTECTED]'
Subject: Question Regarding Pattern Matching and ARGV
> Hello All,
>
> This is my first posting to this Peg, please excuse any protocol ...
>
> I am currently working on a Perl Script and trying to do a pattern m
> Hello All,
>
> This is my first posting to this Peg, please excuse any protocol ...
>
> I am currently working on a Perl Script and trying to do a pattern match
> within an If, like:
>
> if ($Line =~ /field vendno/i)searching for string "field vendno" .
>
> but instead of hard-coding the
14 matches
Mail list logo