in reply to Strange regex behavior - beware chunk boundaries!

update: my sleepy eyes didn't look very well at your code :-/
forget my post ;-)

is it just a typo, or did you forget a tilde?

if (/ID=([0-9]+)/) {
? shouldn't this be:
if (/ID=~([0-9]+)/) {

to ask a question is a moment of shame
to remain ignorant is a lifelong shame

Replies are listed 'Best First'.
Re^2: Strange regex behavior
by tame1 (Pilgrim) on Aug 14, 2005 at 21:58 UTC
    Remember, ID= is part of the actual text I am searching for. Perhaps you were thinking along the lines of $var =~ /some-text/, right?

    Anyhow, without specifying what var to work on, that "if" works on $_.
    So it's really if $_ =~ /ID=([0-9]+)/

    --Jon


    What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"
Re^2: Strange regex behavior
by tame1 (Pilgrim) on Aug 14, 2005 at 21:22 UTC
    Nope. That one is as it should be, I think. --Jon


    What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"