Regular Expression - Cannot Use . and - side by side

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gripi
    Senior Member
    • Jul 2009
    • 249

    Regular Expression - Cannot Use . and - side by side

    hello...

    in the VB admin option, i found this "Username Regular Expression"

    right now i'm using this : ^[a-z][a-z-_.]*[a-z]+$

    my question is, how to make the character "." and "-" or "_" cannot be side by side?

    so after using the "." or "-" or "_", the next character must be alphabet.

    thanks alot.
  • Dody
    Senior Member
    • Aug 2004
    • 1896
    • 3.8.x

    #2
    Should be something like: ^[-_.]*[a-z]+$
    I am not sure this will work, it is already late here but you should get the idea of how it works.
    while(true){
    if(
    $someone->needsHelp() && $i->canHelp()) $post->help();
    if(
    $i->findBug()) $post->bug();
    }

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...