Avatar of PeterBaileyUk
PeterBaileyUk
 asked on

Clear triple or double spaces in string

I have been performing operations by removing certain words but need to tdy up the string so that only 1 space is between the words
example below. if i do replace and "  " or "   " in some cases it removed the single space that i needed.
Expr1

80
80   CC
80   CL
80   SPECIAL
80  FI
80  QUATTRO
80  SE
80 CC
80 CL
80 CLE
80 E
80 E QUATTRO
80 E SE
80 GL
80 GLE
80 GLS
80 GT
80 GTE
80 L
80 LS
80 QUATTRO
80 QUATTRO FI
80 QUATTRO GTE
80 QUATTRO SE
80 RS2
80 S
80 S2
80 SC
80 SE
80 SPECIAL
80 SPORT
80 SPORT SE
Microsoft AccessRegular Expressions

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dan Craciun

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
PeterBaileyUk

ASKER
is this in regex or just replace function?
Dan Craciun

regex
PeterBaileyUk

ASKER
got it great thx
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Dan Craciun

You're welcome.
Jim Dettman (EE MVE)

Other method is:

 Do until Instr(strCheck,"  ")=0
   Replace(strCheck, "  "," ")
 Loop