Thread: Regex examples
View Single Post
Old 09-20-2014, 08:42 PM   #415
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by JimmyG View Post
Okay this regex $(.+)^ finds whole lines with text in them.

But I don't want lines that start with <, so I tried this $([^<].+)^
but that includes any preceding blank line and the next line, whether it starts with < or not, and I don't know why.

I want whole lines (not empty) that don't start with a tag.
it might help if you post the code you're trying to parse and the output you expect, because the regex you're using doesn't really fit with what you're describing.

if you're trying to find lines in an html document that don't begin with a < (which would be very rare), then you could use something like

Code:
^\s*[^<\s]+
but i don't think that's really what you're after...
mzmm is offline   Reply With Quote