/    Sign up×
Community /Pin to ProfileBookmark

Stupid Reg Ex Problem

Ok, so here’s what I got:

[code]$contact_grad = sanitize($_POST[‘contact_grad’],'[0-9′]’);[/code]

I need it to accept 0-9 or ‘ characters. For some reason a ‘ will kill it.

Did I not put it in there right?

Thanks,
Will

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@aaronbdavisJul 31.2006 — looks like it should be right. It may need a comma. Try replacing the 0-9 with d, which means the same thing.
×

Success!

Help @tgrk35 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...