Re: RegExp matching over multiple lines

2008-10-21 Thread Chris Wagner
gt;(.+?)<\/div>/sg; As others have said using one of the HTML modules is the best way to handle general parsing, but in trivial cases simple regex's like this are fine. At 09:46 AM 10/21/2008 -0700, Andy Postulka wrote: >I'm having difficulty using RegExp to match/extract acros

RE: RegExp matching over multiple lines

2008-10-21 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Postulka Sent: 21 October 2008 17:47 To: perl-win32-users@listserv.ActiveState.com Subject: RegExp matching over multiple lines > Hi to everyone, > > First off I hope I'm posting this to the right Mailing list. &g

RE: RegExp matching over multiple lines

2008-10-21 Thread Tobias Hoellrich
obias From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Postulka Sent: Tuesday, October 21, 2008 10:47 AM To: perl-win32-users@listserv.ActiveState.com Subject: RegExp matching over multiple lines Hi to everyone, First off I hope I'm posting this to the right Mailing li

RegExp matching over multiple lines

2008-10-21 Thread Andy Postulka
Hi to everyone, First off I hope I'm posting this to the right Mailing list. If not, please forgive me in advance. I just started using ActivePerl I'm having difficulty using RegExp to match/extract across several lines in an HTML file. I want to match and extract everything between

Re: regexp question

2004-12-15 Thread eric-amick
> I seem to be missing a piece of the puzzleI want to define a character > class ([]) > with atoms to (not) match involve negative look-ahead assertions.but no > joy. > > I am reading a stream of text that may contain the two segments \\n and \" > > I want

RE: regexp question

2004-12-15 Thread Christopher Hahn
Production could deal with. Thanks (Mr $) to all! chahn -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 7:37 PM To: Christopher Hahn Cc: [EMAIL PROTECTED] Subject: Re: regexp question Christopher Hahn wrote: > $Bill, > > The

Re: regexp question

2004-12-14 Thread $Bill Luebkert
Christopher Hahn wrote: > $Bill, > > The (?: ) construct may be non-capturing, but it does eat text from the > buffer (sic) > > ...and, besides, when I ran it I saw this: > = > 1: asd asdf adf asd \n asd adf > 2: asd asdf adf asd \n asd adf > 3: asd asdf adf

RE: regexp question

2004-12-14 Thread Christopher Hahn
bkert [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 1:41 PM To: Christopher Hahn Cc: [EMAIL PROTECTED] Subject: Re: regexp question Christopher Hahn wrote: > Hey, > > I seem to be missing a piece of the puzzleI want to define a > character class ([]) with atoms

Re: regexp question

2004-12-14 Thread $Bill Luebkert
gments \\n and \" > > I want to define a regexp that will match up to the first of either of > these. > > ...ie. something like ([^]*) where the character class is just the two > sequences above. > > ...but they are not characters at all, but strings, and so I wonder

regexp question

2004-12-14 Thread Christopher Hahn
Hey, I seem to be missing a piece of the puzzleI want to define a character class ([]) with atoms to (not) match involve negative look-ahead assertions.but no joy. I am reading a stream of text that may contain the two segments \\n and \" I want to define a regexp that will match

Re: regexp!

2004-06-19 Thread Ted Schuerzinger
$Bill Luebkert graced perl with these words of wisdom: > Ananthan S wrote: > >> >> hi., >> >> what is regular expression ? And in hash variable can get a key >> through its value..? > > You can't get a key from a value as easily as you can get a value > from a key, but if your

Re: regexp!

2004-06-18 Thread $Bill Luebkert
Ananthan S wrote: > > hi., > > what is regular expression ? And in hash variable can get a key > through its value..? You can't get a key from a value as easily as you can get a value from a key, but if your values are unique, you could do it be reversing the hash. If you hav

regexp!

2004-06-18 Thread Ananthan S
hi., what is regular expression ? And in hash variable can get a key through its value..? Please clear me.. and point out me some good website on perl programs and faqs Thanks // Ananthans // -*"*-.,,.-*"*-.,,.-*"

Re: split / regexp / $/=''and

2003-08-14 Thread $Bill Luebkert
J Bennohr wrote: > Hello, maybe someone can help me. Either answering 1., 2. or 3. would be enough > to get my program doing what I'd like it to do. > > > 1. How can I split $_ at \n except when in the following regular expression: > > A.*\nB.* I'm not sure I follow that, but an if would be

RE: Regexp needed

2002-10-17 Thread Carl Jolley
On Mon, 14 Oct 2002 [EMAIL PROTECTED] wrote: > Hi, i have a file like this: > . > p167 bt1sqtf4 2720 1055adelevin 2002-10-14 11:21 > p130 bt1sqtf4 1753 520 aginer2002-10-14 10:33 > p143 bt1sqtf4 1658 518 alchippe 2002-10-14 10:30 > p144 bt1sqtf4 177

RE: Regexp needed

2002-10-14 Thread Krishna, Hari
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: RE: Regexp needed Hi, i have a file like this: . p167 bt1sqtf4 2720 1055adelevin 2002-10-14 11:21 p130 bt1sqtf4 1753 520 aginer2002-10-14 10:33 p143

RE: Regexp needed

2002-10-14 Thread Stovall, Adrian M.
: [EMAIL PROTECTED] Subject: RE: Regexp needed Hi, i have a file like this: . p167 bt1sqtf4 2720 1055adelevin 2002-10-14 11:21 p130 bt1sqtf4 1753 520 aginer2002-10-14 10:33 p143 bt1sqtf4 1658 518 alchippe 2002-10-14 10:30 p144 bt1sqtf4 1777 663

RE: Regexp needed

2002-10-14 Thread JGONCALV
Hi, i have a file like this: . p167 bt1sqtf4 2720 1055adelevin 2002-10-14 11:21 p130 bt1sqtf4 1753 520 aginer2002-10-14 10:33 p143 bt1sqtf4 1658 518 alchippe 2002-10-14 10:30 p144 bt1sqtf4 1777 663 amaragou 2002-10-14 10:33 p175 bt1sqtf4

Re: Regexp with 0

2002-09-18 Thread $Bill Luebkert
Muñoz O, Normann (Valparaíso) wrote: > Hi, I have a question: > > I get from STNDIN a string, for each caracter I check if it belong to a > predifined group, the problem is that the caracter '0' is in that > group'. As 0 es false, the match doesn't consider it. > > ¿How can I do that so the m

RE: Regexp with 0

2002-09-18 Thread Norris, Joseph
Title: Regexp with 0 Normann,   Mi surgencia es que utiliza lo siguiente:     CARACTER[$i] =~/^([0|a|c|0])/   usando corchetes dira a Perl que este es una clase de caracter que pertenece al grupo que esta buscando.   Espero que este le ayude.   Dispense que not tengo este teclado con

RE: Regexp with 0

2002-09-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: Regexp with 0     Change to an if:       if ( CARACTER[$i] =~ /^(a|b|1|0)/g; ) {     #true  }else {     # false }   Wags ;) -Original Message-From: "Muñoz O, Normann (Valparaíso)" [mailto:[EMAIL PROTECTED]]Sent: Friday, September 06, 20

Re: regexp

2002-08-14 Thread Carl Jolley
On Wed, 14 Aug 2002, Jacobson, Karl wrote: > I am trying simply to do a search and replace and have identified the string > that I want to replace with another. > > $_ holds the string to be manipulated > $was holds the search string (split from an input file) > $is holds the replacement string (

Re: regexp

2002-08-14 Thread Jing Wee
At 03:45 PM 8/14/2002 -0700, you wrote: >I am trying simply to do a search and replace and have identified the string >that I want to replace with another. > >$_ holds the string to be manipulated >$was holds the search string (split from an input file) >$is holds the replacement string (also spli

RE: regexp

2002-08-14 Thread Carter Thompson
ednesday, August 14, 2002 3:46 PM > To: [EMAIL PROTECTED] > Subject: regexp > > > I am trying simply to do a search and replace and have > identified the string > that I want to replace with another. > > $_ holds the string to be manipulated > $was holds the search

regexp

2002-08-14 Thread Jacobson, Karl
I am trying simply to do a search and replace and have identified the string that I want to replace with another. $_ holds the string to be manipulated $was holds the search string (split from an input file) $is holds the replacement string (also split from an input file) s/$was/$is/; doesn't wo

RE: CGI Environment Problem (was: Regexp Help)

2002-07-25 Thread Fernando Madruga
e CGI scripts may have diferent environment variables on the two machines. HTH, Fernando Madruga -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Mike Kalinovich Sent: quarta-feira, 24 de Julho de 2002 19:47 To: [EMAIL PROTECTED] Subject: RE: Regexp n

RE: Regexp needed

2002-07-24 Thread Mike Kalinovich
Hello all, I'm at a bit of a loss as to why the same script on two servers are experiencing a difference in opinion. Both are NT4 with all the latest and greatest patches from MS. Both are running SP6a Both are running ActiveState v5.2.2 The CGI script is from tools4webmasters.com This is an ex

RE: Regexp needed

2002-03-05 Thread Thomas Bätzler
Lee Goddard [[EMAIL PROTECTED]] suggested: > 1. Read the regex POD (perldoc perlre) or better > buy the Programming Perl book and read its great regex pages. An of course ORA also has the wonderful "Mastering Regular Expressions" by Jeffrey Friedl (aka the Owl book), which gives you a nice ground

Re: Regexp needed

2002-03-05 Thread $Bill Luebkert
Jorge Goncalvez wrote: > hi, i have this: > my ($Path) = $MountsPath =~ /(.+?)cygwin/; > but I wanted to get rid of the "/". > because $MountsPath could be c:/cygwin or c:/xyz/cygwin or c:/xyz/zyx/cygwin and > i wanted $Path = c: or c:/xyz or c:/xyz/zyx . > And now $Path= c:/ or c:/xyz or c:/xyz

RE:Parsing and regexp

2002-01-09 Thread Jorge Goncalvez
improve my regexp if ($_ =~/Adresse IP/) to check the IP address indepentmently of the language (I know that the searched string contains always "IP" ) Thanks ___ Perl-Win32-Users mailing list [EMAIL PROTE

Re: how to represent "any character" (incl. \n) in regexp?

2001-04-08 Thread Carl Jolley
t; > But this prints out "no". It turns out that inside the square brackets, > "." represents the period character and not "any character"; if you change > string to "a.bc", the script print "yes: ." . In that case, how do you > represent &

Fw: how to represent "any character" (incl. \n) in regexp?

2001-04-07 Thread Andy Jennings
- Original Message - From: "Andy Jennings" <[EMAIL PROTECTED]> To: "jose quesada" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, April 07, 2001 11:43 PM Subject: Re: how to represent "any character" (incl. \n) in regexp? &g

Re: how to represent "any character" (incl. \n) in regexp?

2001-04-07 Thread Andy Jennings
Try (.|\n) instead. Andy - Original Message - From: "Bennett Haselton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 07, 2001 11:08 PM Subject: how to represent "any character" (incl. \n) in regexp? > Since according to

Re: how to represent "any character" (incl. \n) in regexp?

2001-04-07 Thread jose quesada
string = 'abc'; > if ($string =~ /([.\n])/) > { > print "yes: $1\n"; > } > else > { > print "no\n"; > } > >>> > > But this prints out "no". It turns out that inside the square brackets,

how to represent "any character" (incl. \n) in regexp?

2001-04-07 Thread Bennett Haselton
er and not "any character"; if you change string to "a.bc", the script print "yes: ." . In that case, how do you represent "any character" inside a regexp? -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: regexp matching more unpredictable in ActivePerl?

2001-04-04 Thread Ian . Stewart
s/AirTouch Subject:        Re: regexp matching more unpredictable in ActivePerl? [IMAGE] > No one has yet (at least as far as I've noticed) posted results using Perl 5.6 on UNIX. I did in my second post. This isn't my second post but a smaller example: --- us

Re: regexp matching more unpredictable in ActivePerl?

2001-04-04 Thread Ian . Stewart
using Perl 5.6 on UNIX. Regards, Ian To:        [EMAIL PROTECTED] cc:        [EMAIL PROTECTED] (bcc: Ian Stewart/Great Lakes/AirTouch) bcc:        Ian Stewart/Great Lakes/AirTouch Subject:        Re: regexp matching more unpredictable in ActivePerl? [IMAGE] > I am

Re: regexp matching more unpredictable in ActivePerl?

2001-04-04 Thread Ron Grabowski
> I am no regex expert, but maybe it has to do with the underlying regex > engine (i.e. NFA, DFA etc) and the implicit/explicit greediness of that > engine for the specific boxes used. Regardless of the implimentation of the engine, we should at least be getting the same results across different

RE: regexp matching more unpredictable in ActivePerl?

2001-04-04 Thread Joseph P. Discenza
[EMAIL PROTECTED] : Also, if you start the regex at the beginning /^\W((\w+\W+){0,25})/) : there is no output Perhaps because there is no non-word character at the beginning of "word word word ..." :) Joe == Joseph P. Discen

can you match " OR end-of-string" in regexp?

2001-04-03 Thread Bennett Haselton
of the string". But when I run the code, I get the error "/(ab[c5.006)/: unmatched [] in regexp at test3.pl line 3", because the parser sees "$]" and thinks I want to interpolate the perl version. However, if I replace "$" with "\$", the parser thinks I m

Help with Regexp

2001-03-14 Thread Vinicius Alves
Hi all... I´m using an HTML template to put the values of a database in the values of the fields. I´ve been tying to do that by setting the field value: $variable, to that when I call while (){ print; } the html code shows up, when what I want is . So I need a regexp that would look for s

Re: hash key with a regexp

2001-02-20 Thread SCOTT_SISSON
EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent by: cc: [EMAIL PROT

RE: hash key with a regexp

2001-02-20 Thread Joseph P. Discenza
Greg Wardawy wrote, on Tuesday, February 20, 2001 15:22 : Hello all, Is it correct to say: print if $var1 == $hash{$key =~ : /$var2\d+/}; or: print if $var1 == $hash{$key\d+}; if I need a : conditional print for all keys of the hash which starts with : $var2? The reason I'm asking is that I hav

hash key with a regexp

2001-02-20 Thread Greg Wardawy
Hello all, Is it correct to say: print if $var1 == $hash{$key =~ /$var2\d+/}; or: print if $var1 == $hash{$key\d+}; if I need a conditional print for all keys of the hash which starts with $var2? The reason I'm asking is that I have a comma separated list: LT00430,31 LT00432,32 LT00504,33

Re: RegExp Question

2001-02-05 Thread Philip Newton
John Giordano wrote: > $grep_deferred = system ('findstr DeferredStatus response1'); > > print "$grep_deferred\n\n"; [snip] > $grep_deferred has this in it: > > src="/images/btnstats.gif" width=120 height=40 border=0 alt="Mail > Status"> Are you sure? Try printing out "bloop\nblip\n$grep_defer

Re: RegExp Question

2001-02-04 Thread $Bill Luebkert
John Giordano wrote: > > Hello, > > Could someone please tell me why this: > > ### > $grep_deferred = system ('findstr DeferredStatus response1'); > > print "$grep_deferred\n\n"; > > if ($grep_deferred =~ / > print "It contains } else { > > print "It doesn't contain } > --

Re: Is it work for for RegExp?

2001-01-27 Thread Carl Jolley
On Sat, 27 Jan 2001, Joe Schell wrote: > > > [EMAIL PROTECTED] wrote: > > > > Hi, > > Can you help please? > > I need to find a substring that starts at a certain position. But if this > > position is a letter the substring must be the whole word and starts > > at a space. > > > > Example: >

RE: Is it work for for RegExp?

2001-01-27 Thread Carl Jolley
== > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Friday, January 26, 2001 5:50 AM > > To: [EMAIL PROTECTED] > > Subject: Is it work for for RegExp? > > > > > > Hi, > > Can you help

Re: Regexp?

2001-01-23 Thread Philip Newton
Cornish, Merrill wrote: > In list context, m//g returns a list of all matches. You > could count the elements in the list. For example, like this: $count = () = $string =~ /foo/g; The assignment to () (empty list) puts the match in list context, and the scalar assignment then counts how

RE: Regexp?

2001-01-19 Thread Ted W.
t; > Merrill > > > -Original Message- > > From: Roman Melihhov [SMTP:[EMAIL PROTECTED]] > > Sent: Friday, January 19, 2001 2:22 PM > > To: '[EMAIL PROTECTED]' > > Subject:Regexp? > > Importance: High > > > > Hi, &g

Re: Regexp?

2001-01-19 Thread Michael D. Schleif
Roman Melihhov wrote: > > Is there an elegant way to determine number of times substring is repeated > within a string except a loop with incrementing counter. Regexp perhaps? > Ideas appreciated. #! perl -w use strict; my $str = "iamike mike is a good guy but,

RE: Regexp?

2001-01-19 Thread Cornish, Merrill
2001 2:22 PM > To: '[EMAIL PROTECTED]' > Subject: Regexp? > Importance: High > > Hi, > Is there an elegant way to determine number of times substring is repeated > > within a string except a loop with incrementing counter. Regex

Regexp?

2001-01-19 Thread Roman Melihhov
Hi, Is there an elegant way to determine number of times substring is repeated within a string except a loop with incrementing counter. Regexp perhaps? Ideas appreciated. Roman. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http

RE: Regexp questions...

2000-11-19 Thread Carl Jolley
On Sat, 18 Nov 2000, Naftel, Bill S wrote: > Carl, i think i see where you're going by capturing the pieces in $1, > $2, correct? then you just have to check each to be < 255? is there > some, pardon, 'slick' way to do this say all at once? The only 'slick' (perhaps some would say sick) way I ca