Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Quote:
|
^ indicates what the match should start with, . (dot) means any character and * means zero or more of that character, $ indicates where the match should end.
|
I'm not a regexp expert neither, but ^ and $ don't exactly means that.
In multiline mode, ^ means "beginning of the line" and $ "end of the line".
So, your pattern would need to be at the beginning of a line and to terminate the same line to be matched.
Only when you are working on a single line, does ^ and $ means what Mattias meant.
As you most likely will be using the multiline mode if you parse a full page, I'd recommend you to drop the ^ and $ characters of the regexp given the previous post.
__________________
Only a biker knows why a dog sticks his head out the window.
|