It doesn't really matter, but I'm a little obsessive about little details like this. I wanna have the names of these brands have spaces in them. Such that "BankofAmerica" "BankofNewYork" are Bank of America, Bank of New York, Union Bank, and so on.
How might I do this? Presuambly, regexm would be involved in some way? I guess the idea would be to to breakup the string at the occurrence of a new capital letter, if the previous letter wasn't a capital letter?
So far, I've tried
which gets us part of the way there.
How might I do this? Presuambly, regexm would be involved in some way? I guess the idea would be to to breakup the string at the occurrence of a new capital letter, if the previous letter wasn't a capital letter?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str46 yougovname "BankofAmerica" "BankofNewYork" "Barclay's" "BB&T" "Chase" "Citibank" "Comerica" "Fifth-Third" "HSBC" "HuntingtonBank" "KeyBank" "M&TBank" "BMOHarrisBank" "PNCBank" "RegionsBank" "SunTrust" "UnionBank" "USBank" "WellsFargo" "ZionsBank" "BlackAngus" "Bonefish" "BucadiBeppo" "ChartHouse" "Fleming's" "J.Alexander's" "KonaGrill" "LoneStarSteakhouse" "LongHornSteakhouse" "Maggiano's" "McCormick&Schmick's" "Morton's" "OutbackSteakhouse" "P.F.Chang's" "RainforestCafe" "Ruth'sChris" "SaltgrassSteakhouse" "Smith&Wollensky" "SmokeyBonesBBQ&Grill" "TexasRoadhouse" "ThePalm" "TonyRoma's" "Arby's" "BajaFresh" "BurgerKing" "Carl'sJr" "Chipotle" "Church's" "Hardee's" "In-N-Out" "JackintheBox" "KFC" "Krystal" "LongJohnSilvers" "McDonald's" "Nathan'sFamous" "Popeyes" "Quiznos" "Rubio's" "Schlotzsky's" "Subway" "TacoBell" "Wendy's" "Whataburger" "WhiteCastle" "Wienerschnitzel" "Advair" "Ambien" "Avandia" "Avodart" "Boniva" "Cialis" "Coreg" "Coricidin" "Crestor" "Imitrex" "Levitra" "Lipitor" "Nexium" "Plavix" "Relpax" "Requip" "Singulair" "Valtrex" "Viagra" "Wellbutrin" "Zantac" "Zocor" "Zoloft" "Zyrtec" "AAMCO" "AdvanceAutoParts" "Arco" "AutoZone" "BP" "Bridgestone" "Carquest" "Chevron" "Citgo" "ConocoPhillips" end
Code:
foreach L in `c(ALPHA)' {
replace you= subinstr(you, "`L'", " `L'", .)
}

Comment