Jump to content

Just some help related to preg_replace()


matthewlesh

Recommended Posts

i know this is kinda dume but i am a newbie and working on a username validating system...

 

and it needs to do the following things...

 

Only allow lowercase letters

Allow numbers

Allow "_" and "$"

 

and not allow anything else...

 

and if it does not go by this print an error out.

 

Please help:D

Link to comment
https://forums.phpfreaks.com/topic/53031-just-some-help-related-to-preg_replace/
Share on other sites

First of all you should post it in regex forum

-------------------------------------------------------------

Your subject is "Just some help related to preg_replace()"

But there is nothing about replacing in your Question

Its all about ereg() and preg_match()

--------------------------------------------------------------

Use this regex with ereg() or preg_match()

[0-9_\$]+

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.