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
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
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
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
> 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
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
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
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
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
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
$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
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
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 //
-*"*-.,,.-*"*-.,,.-*"
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
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
: [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
: [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
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
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
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
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
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 (
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
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
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
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
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
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
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
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
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 &
- 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
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
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,
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
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
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
> 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
[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
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
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
EMAIL PROTECTED]> To:
<[EMAIL PROTECTED]>
Sent by: cc:
[EMAIL PROT
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
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
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
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 }
> --
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:
>
==
>
> > -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
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
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
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,
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
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
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
54 matches
Mail list logo