[Project_owners] Help with a regular expression?

David Murray lid2000 at tpg.com.au
Sat Sep 3 20:58:43 EDT 2005


Hurrah! Thankyou very much! This has been annoying me for way too long.

David.



Ka-Ping Yee wrote:

> On Sat, 3 Sep 2005, David Murray wrote:
> 
>>Matches:
>><br>
>><hr>
>><br class="someclass">
>><br >
>><img src="http://blahblahblah">
>><hr style="something: blah;" class="somethingelse">
>>
>>Doesn't match:
>><br/>
>><br />
>><hr/>
>><img src="http://blahblahblah" />
>><somethingelse>
> 
> 
> How about /<(br|hr|img)([^>]*[^\/]|)>/gi ?  That seems to match the
> examples in your first list and not match the examples in your second
> list.  (However, it will break down if there are ">" characters in
> any attributes on these tags.)
> 
> 
> -- ?!ng
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 
> 
> 
> 



More information about the Project_owners mailing list