• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

Extract data

I need to extract the bgcolor regardless if it's surrounded in quotes, etc.

<BODY bgColor=#cccc99 leftMargin=0 topMar...
0
eroute
Asked:
eroute
1 Solution
 
ozoCommented:
$_='<BODY bgColor=#cccc99 leftMargin=0 topMar...';
($bgcolor)=/\bbgColor\s*=\s*["']?([^"'\s]+)/i;
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now