View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_1168_] Simon Lloyd[_1168_] is offline
external usenet poster
 
Posts: 1
Default Modifying regex to accept comma's?



Ron much appreciated thanks :)Ron Rosenfeld;395805 Wrote:
On Fri, 26 Jun 2009 16:53:05 +0100, Simon Lloyd
wrote:

Aha!, got it with some playing around!
^[A-Za-z]{2}[,A-Za-z ]*$


That should work.

Here are some links you may find useful (if they are still good :-))

Regular Expressions
'Regular Expressions Reference - Basic Syntax'
(http://www.regular-expressions.info/reference.html)
'How To Use Regular Expressions in Microsoft Visual Basic 6.0'
(http://tinyurl.com/kwem2c)
'Introduction to Regular Expressions (Scripting)'
(http://msdn2.microsoft.com/en-us/library/6wzad2b2.aspx)
'What's New in Windows Script 5.5'
(http://msdn2.microsoft.com/en-us/library/ms974619.aspx)
'Regex Guru' (http://www.regex-guru.info/)
--ron



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=110364