I found a neat little script here @ tek-tips, but I don't fully understand the script. I know what it doest but don't know why.
Source:
I echo'ed match, submatch1 etc. and know what it "holds" but where do they come from? Where are they declared? Basically what I want is to replace the .pattern with: [^a-z\d\u0100-\uffff] (so the script propercases after every special character, currently it fails at the _ in StePH_hens).
Explanation's are welcome and any help with replacing my .pattern with the current one is also very appreciated!
Dalie
Code:
data = " 21"",""BOB D."",""StePH_hens"",""SA052"",""CALL REAL ESTATE"",""CALL01"",""(804)411-2222"" "
...
.Pattern = "\b(\w)(\w*?)\b"
...
Function ProperCase(match, submatch1, submatch2, index, source)
ProperCase = UCase(submatch1) & LCase(submatch2)
End Function
I echo'ed match, submatch1 etc. and know what it "holds" but where do they come from? Where are they declared? Basically what I want is to replace the .pattern with: [^a-z\d\u0100-\uffff] (so the script propercases after every special character, currently it fails at the _ in StePH_hens).
Explanation's are welcome and any help with replacing my .pattern with the current one is also very appreciated!
Dalie