Jump to content

RegExp confused


robert_gsfame

Recommended Posts

Well perhaps you should be clearer in future? You're English isn't exactly perfect.

 

Anyway, first idea that comes to mind:

 

var str = '£$ewe£$1556£$%£';

if (!str.match(/([a-z].*[0-9]|[0-9].*[a-z])$/i))
{
    alert("this field must contain at least 1 number and 1 letter");
}

Link to comment
https://forums.phpfreaks.com/topic/204167-regexp-confused/#findComment-1069420
Share on other sites

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.