Reputation: 41
/<peanut\:compressedContent>(.*?)<\/peanut\:compressedContent>/si
currently support no attributes but i also want to capture the stuff even if it has attributes.
Upvotes: 0
Views: 308
Reputation: 145482
http://www.regular-expressions.info/examples.html#~HTML
You can use [^>]*
to match/ignore anything within tags. Likewise you might want to use [^<>]*
instead of .*?
for ensuring it only matches text content:
/<peanut:compressedContent[^>]*>([^<>]*)<\/peanut:compressedContent>/si
Upvotes: 1