Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

rgxextract() in a query to extract any one of many possibilities

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Sponseller - 23 Jul 2007 04:00 GMT
I am using access 2003.

rgxExtract() from
http://www.j.nurick.dial.pipex.com/Code/vbRegex/rgxExtract.htm#Code
has helped me solve a problem partially but if anyone can tell me how to get
rgxextract() to find in a text Field "this or that or the other"

heres whats going on; I am pasting information into a Field, and rgxextract
in a query looks through the data that can be in any order to find what I ask
it to.

However the data doesn't cooperate as easily. for example the pasted data
will read "a cute 3bdr house for rent" and the following will extract the
data of 3bdr for me...... rgxExtract([paste row]," 3bdr")...... Unfortunately
if the ad reads with a slight variation of "a cute 3 bd house for rent" or "
a cute 3 bed for rent"  or "a cute 2 bd house for rent" as you can see people
have a different way of describing the information regarding how many
bedrooms the house has.

 I tried variations of  rgxextract. for example I tried; rgxExtract([paste
row],"3bdr","2 bdr","3 bed","3 bd","3bd")

I did this in hopes that rgx would look for all of those values and bring
back which one it found.

If I can't do this then I will need to make several new Fields in the query
to represent every possibility, then make another Field that will put them
all together and show me the results.

BTW I am using query to do this operation because of my limited VBA
knowledge


Thank you, for your consideration, Dave
Douglas J. Steele - 23 Jul 2007 12:06 GMT
You're going to have to learn more about Regular Expressions, and pass the
correct expression to the function. Unfortunately, I'm not that up on
regular expressions myself, but I think a pattern of "\d ?bdr" should accept
any digit followed by an optional space followed by the letters bdr, so that
it would find 1 bdr, 2bdr, 3 bdr, 3bdr etc.

http://www.regular-expressions.info/ looks like a good place to start.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I am using access 2003.
>
[quoted text clipped - 36 lines]
>
> Thank you, for your consideration, Dave
Dave Sponseller - 24 Jul 2007 03:12 GMT
Thank you Douglas,

 That is most of the way there! The change you suggested does extract 1 or
2 or 3 or any number even if there is a space in between or not, I guess for
the other abreviations I can make a new field for each of the different ways
to abreviate bedroom, "\d ?bd" and "\d ?bed"   and any others I learn of,
then have another field look at all those fields to find and display the one
that was found.

thank you,
Dave

> You're going to have to learn more about Regular Expressions, and pass the
> correct expression to the function. Unfortunately, I'm not that up on
[quoted text clipped - 44 lines]
> >
> > Thank you, for your consideration, Dave
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.