michaelbell

ASP - Split on Word

Description: 
This code snippet will split an amount of text at a word rather than a character.
  1. desc = objRecordSet("P_Desc1")
  2. descfinal = left(desc, 130)
  3. Set regEx = New RegExp
  4. regEx.Global = true
  5. regEx.IgnoreCase = True
  6. regEx.Pattern = "(\b\w*$)"