Normal Topic Search for multiple CAPS? (Read 466 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Search for multiple CAPS?
Oct 19th, 2009 at 1:46pm
Print Post Print Post  
Is there a way to search a field for incidences of 2 or more consecutive capital letters?  It is my desire to clean up my Customer database, turning things like "GENERAL ELECTRIC" into "General Electric".  Thanks in advance for your help.
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Search for multiple CAPS?
Reply #1 - Oct 19th, 2009 at 1:57pm
Print Post Print Post  
Search using RegEx, or two consecutive chars with ASCII value between 64 and 91 (A=65, Z=90).

Untested RegEx example:
vPosition = @RegexFindString(ElementName,[A-Z]{2,},0)
If vPosition>0 then you have two or more consecutive UpperCase characters

You may also be able to use @RegexReplaceString to replace the extra UC chars with LC chars.
The search string will probably look something like this: ([A-Z])([A-Z]+)
The replace string will look something like this: $1lower$2
Sorry, but I don't have access to the manuals for correct syntax at this time......
« Last Edit: Oct 20th, 2009 at 3:43am by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged