litlmike Posted December 6, 2006 Share Posted December 6, 2006 I have a value that will return in this format below, it comes as a string of words followed by a line break with a weblink. The first line can be a string of any words, and the weblink below it can be any weblink. I just need the string of words. So I need to some how delete the weblink that is accompanied with the words. Format: one two three http://www.[secret]/[secret]-travel.cfm I am getting the value from a webpage (that I am not allowed to give out here), and the value comes from an element in a table array like, $aArray2[$Col][$i] Thanks in Advance. _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Uten Posted December 7, 2006 Share Posted December 7, 2006 Check out StringRegExp. Or possibly StringTrim[Right|Left] as I'm not sure exactly how you get your data. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Uten Posted December 7, 2006 Share Posted December 7, 2006 Something like this. From the top of my head so I haven ot tested it. $data = "words words words" & @CRLF & "http://web.server.link.com/page" $words = StringTrimRight($data,StringLen($data) - StringInStr($data, @CR)) Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
xcal Posted December 7, 2006 Share Posted December 7, 2006 Or this too... $data = "words words words" & @CRLF & "http://web.server.link.com/page" $words = StringSplit($data, @CR) MsgBox(0, '', $words[1]) How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
litlmike Posted December 7, 2006 Author Share Posted December 7, 2006 Or this too... $data = "words words words" & @CRLF & "http://web.server.link.com/page" $words = StringSplit($data, @CR) MsgBox(0, '', $words[1])Beautiful....works like a charm. Thanks! Both of yours works, but xcal's happens to work with the way I retrieve the data. Thanks again! _ArrayPermute()_ArrayUnique()Excel.au3 UDF 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