Avatar of darls15
darls15
 asked on

Extract an alphanumeric string from a long text field in a MS Access query

Hello

Can someone please help me? I have a long text field which contains an alphanumeric reference which I'm trying to extract in my query and can't seem to get it right.

The string can appear anywhere within the field and begins with "Ref:MSG" and is followed by 8 numbers. These 8 numbers change for each record and there's usually characters or spaces either side of the string.

A couple of string examples are...
action the below request:^Note:  Ref:MSG24621668>^
CUSTOMER^COMMUNICATIONS RE: Ref:MSG61781623non-applicable

The result I am looking for would be...
Ref:MSG24621668
Ref:MSG61781623

If someone could help me with this it would be very much appreciated.

Thanks
darls15
Microsoft Access

Avatar of undefined
Last Comment
darls15

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
als315

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
darls15

ASKER
Awesome, thank you so much!
Your help has saved me hundreds of hours of internet surfing.
fblack61