ausssieautomate Posted May 1, 2009 Share Posted May 1, 2009 Hi Guys, This is real Noob question been playing around with StringSplit command, is it possible to keep the delimiter you split the string by in the final result. For example $Text = "Helloworld - Computer - AutoIT" $array = StringSplit($text, "Computer", 1) result = $Array[2] Result = - AutoIT Is their a way to get the result as "Computer - AutoIT." Cheers Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) Link to comment Share on other sites More sharing options...
Khab Posted May 1, 2009 Share Posted May 1, 2009 Hi Guys, This is real Noob question been playing around with StringSplit command, is it possible to keep the delimiter you split the string by in the final result. For example $Text = "Helloworld - Computer - AutoIT" $array = StringSplit($text, "Computer", 1) result = $Array[2] Result = - AutoIT Is their a way to get the result as "Computer - AutoIT." Cheers Since you know the delimiter anyway, you should be able to make result = "Computer " & result; I believe. There may be a better way but I'm not sure. Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 1, 2009 Share Posted May 1, 2009 result &= ' - Autoit.' [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
WideBoyDixon Posted May 1, 2009 Share Posted May 1, 2009 Using a sledgehammer to crack a walnut? $Text = "Helloworld - Computer - AutoIT" $Result = StringMid($text, StringInStr($text, "Computer")) MsgBox(64, "Result", $Result) WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center] Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 1, 2009 Share Posted May 1, 2009 that would work also.. there are MANY ways to do this [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
ausssieautomate Posted May 1, 2009 Author Share Posted May 1, 2009 Hi Guys, Thx for that problem solved. Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 1, 2009 Share Posted May 1, 2009 no problemo [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
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