It's just showing a technique to use \\1 to access matches in function 
calls.
Don't want to solve it completely. ;-P


----- Original Message ----- 
From: "Mike Franks" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, July 31, 2005 10:02 PM
Subject: Re: [php-list] Lowercase problem


>
> Patrick -
>
> This certainly does a great deal of what is desired.
>
> When I run this, "IMG SRC" remains uppercase. I believe one of the
> goals was to convert all tags (but not values) to lowercase.
>
> I'm also not certain if this would handle the other part of the problem
> - miscellaneous line feeds, etc.
>
>
> On 7/31/2005, "Patrick Bierans" <[EMAIL PROTECTED]> wrote:
>
>>Look at this:
>>
>><?php
>>  $code=' <a href= noop.HTML>    <IMG   SRC = BLIND.gif height=0 width=
>>"11">  </a>';
>>
>>  $code=preg_replace("/<([a-z0-9]+)/mi",'<'.strtolower("\\1"),$code);
>>  $code=preg_replace("/\s*([a-z0-9]+)\s*=\s*\"?\s*([^ 
>>  >\"]+)\s*\"?\s*/mi",'
>>'.strtolower("\\1").'="\\2"',$code);
>>
>>  echo htmlentities($code); // just for output - don't use in-code
>>?>
>>
>>
>>
>>
>>Community email addresses:
>>  Post message: [email protected]
>>  Subscribe:    [EMAIL PROTECTED]
>>  Unsubscribe:  [EMAIL PROTECTED]
>>  List owner:   [EMAIL PROTECTED]
>>
>>Shortcut URL to this page:
>>  http://groups.yahoo.com/group/php-list
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>
>
> Community email addresses:
>  Post message: [email protected]
>  Subscribe:    [EMAIL PROTECTED]
>  Unsubscribe:  [EMAIL PROTECTED]
>  List owner:   [EMAIL PROTECTED]
>
> Shortcut URL to this page:
>  http://groups.yahoo.com/group/php-list
>
>
>
> --------------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>  a..  Visit your group "php-list" on the web.
>
>  b..  To unsubscribe from this group, send an email to:
>   [EMAIL PROTECTED]
>
>  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> --------------------------------------------------------------------------------
>
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h78on44/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1122847788/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to