Re: Ereg capitalization

From: Date: Tue, 08 Apr 2003 13:48:05 +0000
Subject: Re: Ereg capitalization
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-142862@lists.php.net to get a copy of this message
Not going to work. See example 4 on http://www.php.net/manual/en/function.preg-replace.php for how to do this. fasta wrote:
Try this out: $yourBeautifulNewTag = ereg_replace("<([a-zA-Z _\"=//]*)>",strtoupper("//1"),$sourceTag); It might need some fine tuning thoug (i wrote it in 10 secs... got so few time ;) ) Andrea Fastame Liam Gibbs wrote:
I'm not too great with Ereg, so I'm going to pass this along here. Is there a way I can make all of my tags uppercase using ereg? Well, I know there is, but how. I need to make it so it's something like "<[A-Z]+["]*> Something like that. The criteria is that all tags must be in uppercase, but everything inside the quotation marks is to be in lowercase. Any ideas?
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#142862) next »