[RESOLVED] Regular Expression Question
I was wondering if someone could tell me how to match something even in a line break.
I know that \w is any alpha numeric character, and . will do any character except linebreak.
How can I match any character including a line break? I have been looking, but can't seem to find anything.
Thank you for your help.
Re: Regular Expression Question
1 Attachment(s)
Re: Regular Expression Question
Thank you techgnome, but that wasn't really helpful. I pretty much have that information.
I am trying to get everything between body tags on an html page. When I use (?<=<body>).*?(?=</body>) on msn.com, for example, it works because everything is inline with no line breaks. However, if I use the sample below, that expression doesn't work. I am guessing it is because of the line breaks, but, even with multiline turned on, I have been unable to get the same results.
Code:
I couldn't past the text because it was too long. So I am attaching the text file.
I have been working with Expresso to try to figure this out, but haven't been able to. Any help would be great.
One thing I should add; the body tag has multiple settings, so I adjusted the expression to handle that. I can capture the first body tag, but can't get anything after that. This is what I have right now <(body[^>]+>(?=\w*\s*)</body>, but it doesn't work at all.
Re: Regular Expression Question
Ok, I got this to work.
(?<=<body[^>]*>).*?(?=</body>)
Thank you for the help.