Re: PHP preg_match() help
- From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 10:07:30 +0300
I think that the perl regular expressions in PHP are the same as in perl.
If you want to match everything but the ;, the quote and the apostrophes, you
need to use
[^;'"]*
Octavian
----- Original Message -----
From: "Storm Dragon" <bluescale1976@xxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, July 30, 2008 9:50 AM
Subject: PHP preg_match() help
> Hi,
> I am having a bit of a problem. I was never good at the PHP preg_match()
> function. I am working on a website for a client andI need to be able
> to accept anything except ; and space. Well, actually I really need to
> make sure a url is in proper format. The problem is, it could be any
> url and they can be so different. I want to protect against sql
> injection attacks, so I figured getting rid of ; and space would go a
> log way toward that end. I suppose no " or ' would be good too, I can't
> think of any urls with either of those in them, but it's late and I am
> tired, so can't be sure.
> Thanks for any help.
> BlueScale
>
>
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
- References:
- PHP preg_match() help
- From: Storm Dragon
Other related posts:
- » PHP preg_match() help
- » Re: PHP preg_match() help
- » Re: PHP preg_match() help
- » Re: PHP preg_match() help
- » RE: PHP preg_match() help
- » RE: PHP preg_match() help
- PHP preg_match() help
- From: Storm Dragon