Extract data

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

<BODY bgColor=#cccc99 leftMargin=0 topMar...
erouteAsked:
Who is Participating?
 
ozoCommented:
$_='<BODY bgColor=#cccc99 leftMargin=0 topMar...';
($bgcolor)=/\bbgColor\s*=\s*["']?([^"'\s]+)/i;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.