AngelofDeath 0 Posted November 25, 2010 (edited) Edited November 28, 2010 by AngelofDeath Share this post Link to post Share on other sites
MvGulik 86 Posted November 26, 2010 (edited) Nope, thats not possible.$sStr = StringRegExpReplace($sStr, "( .)", StringUpper("$1"))Output = DoSomethingWith( $Me + ButDoMeFirst($WithOtherInput) )That StringUpper() is executed before the StringRegExpReplace() kicks in.[spelling: executer] Edited November 26, 2010 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)"Believing what you know ain't so" ...Knock Knock ... Share this post Link to post Share on other sites
GEOSoft 67 Posted November 26, 2010 (edited) It won't work like that but here is a better function if you are trying to set Title Case. $sStr = "this is some string." Func _TitleCase($s_String) Local $sRtn = "" $aSRE = StringRegExp($s_String, "(\b\w+\b[.:?!;\h]?)(?:\v|$|\h)", 3) If NOT @Error Then For $i = 0 To Ubound($aSRE) -1 $sRtn &= StringUpper(StringLeft($aSRE[$i] & StringLower(StringMid($aSRE[$i], 2) Next EndIf Return ($sRtn) EndFunc Edited November 26, 2010 by GEOSoft GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!" Share this post Link to post Share on other sites
GEOSoft 67 Posted November 26, 2010 I actually could have made it even faster if I was at the computer that has AutoIt installed. By the way, did you check it before or after the Edits? GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!" Share this post Link to post Share on other sites
GEOSoft 67 Posted November 26, 2010 guess thats what I get for laying in bed and writing code. GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!" Share this post Link to post Share on other sites
Malkey 231 Posted November 26, 2010 Try this. Global $sStr = "Ab cd ef this is some string." $sStr = Execute(StringTrimRight(StringRegExpReplace($sStr, "\b(\w)([^ ]* *)", 'StringUpper("$1") & "\2" & '), 3)) ConsoleWrite("!" & $sStr & @CRLF) Share this post Link to post Share on other sites
UEZ 1,273 Posted November 26, 2010 What about the _StringProper() function? #include <String.au3> $sStr = "Ab cd ef" MsgBox(0, "Test", _StringProper($sStr)) Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites