I got hundreds of stylesheets but i need to grab certain parts out of them. All are layed out similar to the one below and I need to grab the sections in red. <style type="text/css"> table, tr, td { background-color:transparent; border:none; border-width:0;} [COLOR="Red"]body { background-color:black; background-image:url('http://www.imageshack.us/bg.gif'); background-attachment:fixed; background-position:top left; background-repeat:repeat; }[/COLOR] table table { border: 0px } table table table table{border:0px} table table table { border-style:solid; border-width:6px; [COLOR="Red"] border-color:ff007e;[/COLOR] background-color:000000; } table, tr, td, li, p, div { font-family:arial; color:fff; font-size:12px; } .btext { font-family:arial; color:fff; font-size:12px; } .blacktext11 { font-family:arial; color:fff; font-size:12px; } .blacktext12 { font-family:arial; color:fff; font-size:12px; } .lightbluetext8 { font-family:arial; color:fff; font-size:12px; } .orangetext15 { font-family:arial; color:fff; font-size:12px; } .redtext { font-family:arial; color:ff007e; font-size:11px; } .redbtext { font-family:arial; color:ff007e; font-size:12px; } .text { font-family:arial; color:fff; font-size:12px; font-weight:bold; } .whitetext12 { font-family:arial; color:fff; font-size:12px; font-weight:bold; } a:active, a:visited, a:link { font-family:arial; color:[COLOR="Red"]ff007e[/COLOR]; font-size:12px; } a:hover { font-family:arial; color:white; font-size:12px; } a.navbar:active, a.navbar:visited, a.navbar:link { font-family:arial; color:white !important; font-size:12px; font-weight:bold; } a.navbar:hover { font-family:arial; color:white; font-size:12px; } a.redlink:active, a.redlink:visited, a.redlink:link { font-family:arial; color:ff007e; font-size:12px; } a.redlink:hover { font-family:arial; color:white; font-size:12px; } .nametext { font-family:arial; color:ff007e; font-size:12px; } </style> Code (markup):
Hmm, you probably want to use preg_match() to find certain areas. Writing it to grab the body tag should be fairly trivial, but it's going to be a bit harder to grab the colors from the big slop of CSS. I'll see if I can't write something for you later today (in between classes for a short time right now)