View Single Post
  #19 (permalink)  
Old 09-09-2007, 02:28 PM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 3,205
Default

Using the new Regex library:
Code:
'Regex1 is a Regex object and Match1 is a Match object.
Sub Globals
End Sub
 
Sub App_Start
 Match1.New1
 Regex1.New1("(?<=^\s*)\w.*\w|\w(?>=\s*)")
 Msgbox(Trim(" some string with spaces "))
End Sub
 
Sub Trim(s)
 Match1.Value = Regex1.Match(s)
 Return Match1.String
End Sub
Reply With Quote