View Single Post
  #1 (permalink)  
Old 03-03-08, 09:35 AM
Snowball Snowball is offline
Newbie Coder
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Search () & regex exact number.

I am using the search() function to search within a comma delimited string using join(). I need to search for an exact number such as 4 but not 14. I'm using
Code:
',?' + num[i].value + ',?'
as the regex, but that returns the extra numbers. How can I use regex to search for an exact number as retrieved by a dynamic variable (in this case 4)?
Reply With Quote