RE: extracting substrings from string using regexp

2005-12-13 Thread Dhanashri Bhate
s... It keeps the exams first and then teaches the lessons. -Original Message- From: Pant, Hridyesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 13, 2005 12:31 PM To: Xavier Noria Cc: Perl Beginners Subject: RE: extracting substri

RE: extracting substrings from string using regexp

2005-12-13 Thread Timothy Johnson
works better. -Original Message- From: Pant, Hridyesh [mailto:[EMAIL PROTECTED] Sent: Monday, December 12, 2005 11:13 PM To: Owen Cook Cc: Perl Beginners Subject: RE: extracting substrings from string using regexp Hi Owen, But in windows when I am trying to install Module YAPE::Regex

RE: extracting substrings from string using regexp

2005-12-13 Thread Owen Cook
On Tue, 13 Dec 2005, Pant, Hridyesh wrote: > But in windows when I am trying to install Module YAPE::Regex I am > getting below error > Can't call method "ok" on an undefined value at > > C:/Perl/site/lib/PPM/UI.pm line 881, <$__ANONIO__> line 17 Sorry, I can't help you with Windows. Also

RE: extracting substrings from string using regexp

2005-12-12 Thread Pant, Hridyesh
om: Owen Cook [mailto:[EMAIL PROTECTED] Sent: 13 December 2005 12:37 To: Perl Beginners Subject: RE: extracting substrings from string using regexp On Tue, 13 Dec 2005, Pant, Hridyesh wrote: > Hi, > I have successfully installed YAPE::Regex::Explain,but when I try to run > ant regex program

RE: extracting substrings from string using regexp

2005-12-12 Thread Owen Cook
On Tue, 13 Dec 2005, Pant, Hridyesh wrote: > Hi, > I have successfully installed YAPE::Regex::Explain,but when I try to run > ant regex program I got below error > > Can't locate YAPE/Regex.pm in @INC (@INC contains: > C:\PROGRA~1\LUCKAS~1\ENGINS~2\ C:/Perl/lib C:/Perl/site/lib .) at > C:/Perl/

RE: extracting substrings from string using regexp

2005-12-12 Thread Pant, Hridyesh
80 (Bad hostname 'ppm.ActiveState.com') Could anybody suggest me how can I install YAPE::regex module successfully. Thanks Hridyesh -Original Message- From: Xavier Noria [mailto:[EMAIL PROTECTED] Sent: 13 December 2005 03:07 To: Perl Beginners Subject: Re: extracting sub

Re: extracting substrings from string using regexp

2005-12-12 Thread Owen Cook
On Mon, 12 Dec 2005, Xavier Noria wrote: > On Dec 12, 2005, at 22:10, Owen wrote: > > > Xavier Noria wrote: > >> On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: > > > >>> I have a string that looks like this : > >>> >>> name="pcmTcuFaultOutOfService"/> > > > >> > >> m// in list contex may

Re: extracting substrings from string using regexp

2005-12-12 Thread John Doe
Owen am Montag, 12. Dezember 2005 22.10: > Xavier Noria wrote: > > On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: > >> I have a string that looks like this : > >> >> name="pcmTcuFaultOutOfService"/> > > > > m// in list contex may help: > > > > my ($id, $name) = $xml =~ m{id="([^"]*)".*n

Re: extracting substrings from string using regexp

2005-12-12 Thread Xavier Noria
On Dec 12, 2005, at 22:10, Owen wrote: Xavier Noria wrote: On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: I have a string that looks like this : m// in list contex may help: my ($id, $name) = $xml =~ m{id="([^"]*)".*name="([^"]*)"/>}; I despair of ever understanding REs

Re: extracting substrings from string using regexp

2005-12-12 Thread Owen
Xavier Noria wrote: > On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: >> I have a string that looks like this : >> > name="pcmTcuFaultOutOfService"/> > > m// in list contex may help: > > my ($id, $name) = $xml =~ m{id="([^"]*)".*name="([^"]*)"/>}; I despair of ever understanding REs

Re: extracting substrings from string using regexp

2005-12-12 Thread Shawn Corey
Ing. Branislav Gerzo wrote: you should learn regexpes, they are very powerful. perldoc perlre See also: perldoc perlrequick Perl regular expressions quick start perldoc perlretut Perl regular expressions tutorial -- Just my 0.0002 million dollars worth, --- Shawn

Re: extracting substrings from string using regexp

2005-12-12 Thread Xavier Noria
On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: hello everyone, I have a simple question. I have a string that looks like this : name="pcmTcuFaultOutOfService"/> and I would like to store the values for id and name in two different variables. I know how to do it using regexp. But the wa

Re: extracting substrings from string using regexp

2005-12-12 Thread Ing. Branislav Gerzo
Alexandre Checinski [AC], on Monday, December 12, 2005 at 11:10 (+0100) wrote: from head: my $string = ''; my ($id, $name) = $string =~ /id="(\d+)".*?name="([^"]+)"/; AC> PS: I'm a total newbie... you should learn regexpes, they are very powerful. perldoc perlre For parsing XMl files use some

extracting substrings from string using regexp

2005-12-12 Thread Alexandre Checinski
hello everyone, I have a simple question. I have a string that looks like this : name="pcmTcuFaultOutOfService"/> and I would like to store the values for id and name in two different variables. I know how to do it using regexp. But the way I do it is done using several lines of code. I'm sure t