Thread
:
Help with a regex pattern please
View Single Post
#
2
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_]
external usenet poster
Posts: 595
Help with a regex pattern please
On Thu, 20 Mar 2008 16:55:57 -0700 (PDT),
wrote:
I have three individual sPattern's that I am working on. How can I
merge them together so that the pattern will look for three digits
followed by either a period, or by a space and a period, or by a space
and a letter?
Const sPattern As String = "d{1,3}(?=\.)"
Const sPattern As String = "d{1,3}[\ ][\.]"
Const sPattern As String = "d{1,3}[\ ][?=\A-Z,a-z]"
Const sPattern As String = "\d{1,3}((\.)|(\ \.)|(\ [A-Z,a-z]))"
You have some optional arguments (I think, I don't recognize the syntax)
that I've removed. This just uses the pipe to separate the three choices.
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com
Reply With Quote
Dick Kusleika[_4_]
View Public Profile
Find all posts by Dick Kusleika[_4_]