View Full Version : Selecting multiple matches of Regular expression searches.


weavinc
03-22-2009, 10:58 AM
I've been asked to create a query for a memo field that contains html pages in text format. I've been asked to extract all "special tags" and their content from each element.
A special tag begins with <!-- Test1 and ends in -->, and may contain
a-z A-Z 0-9 . , ! and -

I assume the syntax for the actual search would be. Could someone help me to set up the use of regular expressions in VBA to select multiple matches of this search criteria.

^[<!-- Test1][^<!--]|[^-->][-->]$

Many thanks

gemma-the-husky
03-22-2009, 11:29 AM
i doubt very much if you will do this with a regular query

you may achieve it with a function that examines each memo field, using instr to find the tag, and matching tag

one thing is - what happens if there are multiple special tags in the field