Subscribe to Acqal

Got Thoughts? Write Us!

Contact
Request
Validate

Approved TYPO3 Agency

Acqal is an approved TYPO3 agency focusing on support, training and website migration.

This means that we...

  • are available on TYPO3.org
  • make substantial contributions to TYPO3 teams
  • are registered as business members of the TYPO3 Association
  • have completed more than four TYPO3 projects
  • have proven our technical abilities with quality TYPO3 extensions
  • use TYPO3 for our own website

Acqal is a TYPO3 Association Business Member

Popular Blog Posts

Blog Topics

Virgil on Twitter

Please wait while virgilhuston tweets load Twitter is loading

Recent Blog Posts

Blog Archives

Acqal Experts Blog About TYPO3 and Other Hot Topics

Simple JavaScript Regular Expression Usage for Matching Strings

JavaScript string matching in a form submission checker
August 25, 2009 12:00 AM EDT

By: Michael Cannon

Sometimes, using JavaScripts own built-in objects really makes life easier for when the inline auto-typing constructs fail.

In the case that lead up to this tip, the typical JavaScript inline regular expression declaration failed for some painful to debug reason. Offender...

var cDay = /DAY/i;

This cDay declaration failed to match strings 'DAY1' and 'DAY2', but did correctly match strings '2DAYS' and '2DAYSNS'.

Coming to the rescue is calling JavaScript RegEx object and using the exec method directly to fire off the regular expression checking with the given string value....