DumontEXE 0.0.1
Regular Expressions

http://www.regular-expressions.info/

 Function FixPhone(str)

  'Create a regular expression object
  Dim re
  Set re = New RegExp

  'specify the pattern
  re.Pattern = "(\d{3}) (\d{3}) (\d{4})"

  'use the test method to verify the pattern
  If re.Test(str) Then
     'use the replace method to format
     FixPhone = re.Replace(str, "($1) $2-$3")
  Else
     MsgBox "No match was found"
  End if

 End Function
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com