Jump to content

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_\$]+

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.