legend Posted February 13, 2014 Posted February 13, 2014 How, would I stringsplit this: "File C:\Windows\System32\notepad.exe" So I only get: "C:\Windows\System32\notepad.exe"
FireFox Posted February 13, 2014 Posted February 13, 2014 Hi, This is not a "stringsplit", but a substring. There are a lot of ways to do it, take a look at the helpfile for the String* functions (like StringTrimLeft, StringReplace). Br, FireFox.
legend Posted February 13, 2014 Author Posted February 13, 2014 That was just what I was looking for, thx firefox
Malkey Posted February 13, 2014 Posted February 13, 2014 Here is a selection to choose from. Local $sString = "File c:\windows\system32\notepad.exe" ; FireFox, you are right. This is not a "stringsplit". I would call it a string. Local $aArray = StringSplit($sString, " ", 2) ; This is a "stringsplit" function which splits the string. MsgBox(0, "StringSplit", $aArray[1]) ;or MsgBox(0, "StringTrimLeft", StringTrimLeft($sString, 5)) ;or MsgBox(0, "StringReplace", StringReplace($sString, "File ", "")) ;or MsgBox(0, "StringRegExpReplace", StringRegExpReplace($sString, "(?i)File ([\a-z]:.+$)", "\1"))
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now