Re: [PHP] Reg Ex
- From: daniel.brown@xxxxxxxxxxxx ("Daniel P. Brown")
- Date: Fri, 31 Oct 2008 09:57:53 -0500
On Fri, Oct 31, 2008 at 9:53 AM, Kyle Terry <kyle@xxxxxxxxxxxxx> wrote:
Thanks for the reply. For now I used substr($filename,0,-4) and that worked
perfectly. I need to learn reg ex badly :(.
Before you do that, learn to read and follow along in an email
thread that you start. We gave you perfect pointers as to (a) why
regexp's aren't needed in this case; and (b) how to better handle it.
Your substr() routine won't work as expected in all cases.
Imagine either an .htaccess file or an extensionless file named
`quagmire`. You'll come up with `cess` and `mire`, respectively.
--
</Daniel P. Brown>
http://www.parasane.net/
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
Ask me about our current hosting/dedicated server deals!
.
- Follow-Ups:
- Re: [PHP] Reg Ex
- From: "Diogo Neves"
- Re: [PHP] Reg Ex
- References:
- Reg Ex
- From: "Kyle Terry"
- Reg Ex
- Prev by Date: mssql_execute returns 1
- Next by Date: Yahoo/Gmail/Hotmail Contacts API
- Previous by thread: Re: [PHP] Reg Ex
- Next by thread: Re: [PHP] Reg Ex
- Index(es):