• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Javascript> Check if string contains VARIABLE

Oct26
2010
Written by Scott Rowley
if (TEXT.match(/b<VARIABLE>b/i) != null) {
alert(true);
}

For instance, I have a domain registration form and we know there are no spaces allowed in domain names, so:

if (TEXT.match(/b<VARIABLE>b/i) != null) {
alert(true);
}

For instance, I have a domain registration form and we know there are no spaces allowed in domain names, so:

if (TEXT.match(/b b/i) != null) {
alert(true);
}
Posted in Javascript, Web Development - Tagged alert, contain, Javascript, string, variable
« Gimp> Gradient text
» Joomla> Preview template before going live

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

See other

  • На http://www.slon4.at sLON4.AT.
  • Смотрите www.slon7.cc sLON7.CC.
  • Sudo Bash
    By Geeks - For Geeks

    Back to Top