Dampe Posted April 4, 2008 Posted April 4, 2008 If I have a file, with lines set out like this: <Mage.AI> 1 </Mage.AI> what would be the best way to go about reading whats inside the brackets (in this case, the 1) Some sort of _ArraySearch with StringinStr? Thanks.
spudw2k Posted April 4, 2008 Posted April 4, 2008 I'm sure you can do this with a regular expression, but I'm kinda fuzzy on that subject. Search the help file for StringRegExp(). I'm sure someone else will post an example of how to do it that way. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
weaponx Posted April 4, 2008 Posted April 4, 2008 I'm sure you can do this with a regular expression, but I'm kinda fuzzy on that subject. Search the help file for StringRegExp(). I'm sure someone else will post an example of how to do it that way.Well...if you need every value between the tags you can use _StringBetween by itself and it will return an array of all matches.
Dampe Posted April 4, 2008 Author Posted April 4, 2008 _StringBetween seems to work perfect Thanks for the help guys =]
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