PHP -> RegEx help
#1

Hi,
I found this regular expression for RP name check:
Код:
([A-Z]{1,1})[a-z]{2,9}+_([A-Z]{1,1})[a-z]{2,9}
(topic) But it seems that it doesn't work in php (using preg_match function).
Anybody can fix this one or give me another one?
BTW I tried checking this one on online checker and it seems that it actually doesn't work with RP names (like First_Last)

EDIT: fixed
Код:
if(preg_match("/^([A-Z]{1,1})[a-z]{2,9}+_([A-Z]{1,1})[a-z]{2,9}$/",$PlayerName)) echo 'Works!';
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)