javascript: is it possible...

  • From: "Alex Hall" <mehgcap@xxxxxxxxx>
  • To: "Blind Programming List" <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 7 Oct 2009 10:28:20 -0400

Hi all,
Does anyone know if I can use a regular expression to see if a sequence exists in a string? For example:
a="12,34";
if(a.contains(/\d,\d/g)){
alert("a digit, followed by a comma, followed by a digit is contained in the string "+a);
}

Maybe a search or something? Would indexOf accept a regular expression? Thanks.


Have a great day,
Alex
New email address: mehgcap@xxxxxxxxx
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts:

  • » javascript: is it possible... - Alex Hall