View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RG III RG III is offline
external usenet poster
 
Posts: 65
Default Tricky regular expression

Hi Claus. Here's a different problem.

How can I test if a string begins with 1) one or more characters, 2) is followed by one or more whitespace characters, 3) and followed by any character string mixed with anything, including whitespaces?

Here are some example strings that meet the above criteria:

"b908 g"
"what g. no 99"
"a b"

Here are some example strings that do NOT meet the criteria:

"b9000 " ' There are no chars after the whitespaces
"abc" ' Missing whitespaces and chars at the end
"ab" ' Missing whitespaces and chars at the end

I basically want to run a true or false test to check if the string follows the patterns mentioned earlier. I'm not sure if it's possible without using regular expressions.

Robert