Rex Posted June 26, 2013 Share Posted June 26, 2013 (edited) Hi Want to try to create a Java Auto updater, for my system - witch auto updates both x86 & x64. My plan is simple, inetget the sources and execute with /s option, but first i need to find a way to get the current ver. from java on the web, and by googling i found this link http://javadl-esd.sun.com/update/1.7.0/map-m-1.7.0.xml . So i thought that i could just "grab", the ver. from the xml file with regex. I'm trying to get this "1.7.0_25-b17" part from this line "https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml" but it seem that my brain some how stopped working just after i typed stringregexp in SiTE, and after staring at the screen for over an hour i closed the project, and went here to cry for help . Hoping that some one could point me in the right direction, or if any one have a other suggestion on how to get the current java online ver. I'm all ears Cheers c;") /Rex Edit: Added Line to text Edited June 26, 2013 by Rex Link to comment Share on other sites More sharing options...
Danyfirex Posted June 26, 2013 Share Posted June 26, 2013 (edited) try something like this: #include <String.au3> #include <Array.au3> $datos=fileread("au-descriptor-1.7.0_25-b17.xml") ;msgbox(0,"",$datos) $aArray1=_StringBetween($datos,"<version>","</version>") _ArrayDisplay($aArray1, 'Default Search') also you can read only some bytes an use _StringBetween without dump the disk. saludos Edited June 26, 2013 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
jdelaney Posted June 26, 2013 Share Posted June 26, 2013 (edited) hey! I just answered an xml question...modified for your cause: $oXML = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf ;~ $oXML.Load(@DesktopDir & "\xml.xml") ; used when loading a downloaded file $oXML.loadxml($your_variable_with_xml_text) ; used when loading a string ;~ ConsoleWrite($oXML.xML) $oVersion = $oXML.selectSingleNode( '//version' ) ConsoleWrite($oVersion.text & @CRLF) Edited June 26, 2013 by jdelaney Danyfirex 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Rex Posted June 26, 2013 Author Share Posted June 26, 2013 try something like this: #include <String.au3> #include <Array.au3> $datos=fileread("au-descriptor-1.7.0_25-b17.xml") ;msgbox(0,"",$datos) $aArray1=_StringBetween($datos,"<version>","</version>") _ArrayDisplay($aArray1, 'Default Search') also you can read only some bytes an use _StringBetween without dump the disk. saludos Hi That only retries the "old" java versions I need to get the newest, and that is displayed in the sting "https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml" Cheers c;") /Rex Link to comment Share on other sites More sharing options...
jdelaney Posted June 26, 2013 Share Posted June 26, 2013 (edited) exactly which parent node do you need the version of? copy just that, here, and i'll show you the xpath to grab it...like: <information xml:lang="en" version="1.0"><caption> Edited June 26, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Rex Posted June 26, 2013 Author Share Posted June 26, 2013 exactly which parent node do you need the version of? copy just that, here, and i'll show you the xpath to grab it...like: <information xml:lang="en" version="1.0"><caption> Hi I need to get only this "1.7.0_25-b17" part of this line "https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml" Cheers c;") /Rex Link to comment Share on other sites More sharing options...
jdelaney Posted June 26, 2013 Share Posted June 26, 2013 (edited) oops, major issues, reposting: #include <Array.au3> $oXML = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf InetGet("https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml", @DesktopDir & "\xml.xml") $oXML.Load(@DesktopDir & "\xml.xml") ; used when loading a downloaded file ;~ ConsoleWrite($oXML.xML) For $oParent In $oXML.selectNodes( '//information' ) $sLanguage = $oParent.getAttribute("xml:lang") $oChild = $oParent.selectSingleNode('./version') If IsObj($oChild) Then $sVersionText = $oChild.Text ConsoleWrite("Language=[" & $sLanguage & "]...Version=[" & $sVersionText & "]" & @crlf) Else ConsoleWrite("Language=[" & $sLanguage & "]...No version" & @CRLF) EndIf Next ConsoleWrite($sVersionText & @CRLF) output: Language=[en]...Version=[1.7.0_25-b17] Language=[zh]...No version Language=[zh_TW]...No version Language=[ja]...No version Language=[ko]...No version Language=[de]...No version Language=[es]...No version Language=[fr]...No version Language=[it]...No version Language=[pt_BR]...No version Language=[sv]...No version 1.7.0_25-b17 just grabbing the en 'version' $oXML = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf InetGet("https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml", @DesktopDir & "\xml.xml") $oXML.Load(@DesktopDir & "\xml.xml") ; used when loading a downloaded file ;~ ConsoleWrite($oXML.xML) For $oParent In $oXML.selectNodes( '//information[@xml:lang="en"]' ) $sLanguage = $oParent.getAttribute("xml:lang") $oChild = $oParent.selectSingleNode('./version') If IsObj($oChild) Then $sVersionText = $oChild.Text ConsoleWrite("Language=[" & $sLanguage & "]...Version=[" & $sVersionText & "]" & @crlf) Else ConsoleWrite("Language=[" & $sLanguage & "]...No version" & @CRLF) EndIf Next ConsoleWrite($sVersionText & @CRLF) Edited June 26, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Danyfirex Posted June 26, 2013 Share Posted June 26, 2013 use this ¬¬ jdelaney 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
jdelaney Posted June 26, 2013 Share Posted June 26, 2013 reworked post 7...ready to go IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Rex Posted June 26, 2013 Author Share Posted June 26, 2013 This grabs all the version nodes: $oXML = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf InetGet("https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml", @DesktopDir & "\xml.xml") $oXML.Load(@DesktopDir & "\xml.xml") ; used when loading a downloaded file ;~ ConsoleWrite($oXML.xML) For $oParent In $oXML.selectNodes( '//information' ) $sLanguage = $oParent.getAttribute("xml:lang") $oChild = $oXML.selectSingleNode('//version') ConsoleWrite("Language=[" & $sLanguage & "]...Version=[" & $oChild.text & "]" & @crlf) Next output: Language=[en]...Version=[1.7.0_25-b17] Language=[zh]...Version=[1.7.0_25-b17] Language=[zh_TW]...Version=[1.7.0_25-b17] Language=[ja]...Version=[1.7.0_25-b17] Language=[ko]...Version=[1.7.0_25-b17] Language=[de]...Version=[1.7.0_25-b17] Language=[es]...Version=[1.7.0_25-b17] Language=[fr]...Version=[1.7.0_25-b17] Language=[it]...Version=[1.7.0_25-b17] Language=[pt_BR]...Version=[1.7.0_25-b17] Language=[sv]...Version=[1.7.0_25-b17] edit, just saw your post: $oXML = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf InetGet("https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml", @DesktopDir & "\xml.xml") $oXML.Load(@DesktopDir & "\xml.xml") ; used when loading a downloaded file ;~ ConsoleWrite($oXML.xML) For $oParent In $oXML.selectNodes( '//information[@xml:lang="en"]' ) $sLanguage = $oParent.getAttribute("xml:lang") $oChild = $oXML.selectSingleNode('//version') $sVersionText = $oChild.Text ConsoleWrite("Language=[" & $sLanguage & "]...Version=[" & $sVersionText & "]" & @crlf) Next ConsoleWrite($sVersionText & @CRLF) output: Language=[en]...Version=[1.7.0_25-b17] 1.7.0_25-b17 Hi It only works on the "final" xml file not the list overview "http://javadl-esd.sun.com/update/1.7.0/map-m-1.7.0.xml" in this file there is the line "https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xml" in where i try to get the 1.7.0_25-b17 from. sry if didn't explained my self properly the first time, my brain is still not working correct Cheers c;") /Rex Link to comment Share on other sites More sharing options...
jdelaney Posted June 26, 2013 Share Posted June 26, 2013 (edited) I see, so you need to work with 2 xml files...one to point to the second, to grab the version...will respond shortly on this response edit: multiple nodes on that first xml have the xml file linked...how do you determine which one to use? I know it doesn't really matter (short run), but in the long run, that might screw up if you just grab, say, the first 1 Edited June 26, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Rex Posted June 26, 2013 Author Share Posted June 26, 2013 (edited) I see, so you need to work with 2 xml files...one to point to the second, to grab the version...will respond shortly on this response edit: multiple nodes on that first xml have the xml file linked...how do you determine which one to use? I know it doesn't really matter (short run), but in the long run, that might screw up if you just grab, say, the first 1 Hi Thats why i hoped to use regexp, so i just could get the list and then "steal" the version number from that - and not having to inetget both xml files Cheers c;") /Rex Edited June 26, 2013 by Rex Link to comment Share on other sites More sharing options...
jdelaney Posted June 26, 2013 Share Posted June 26, 2013 (edited) here we go...just grabbing the LAST one: $oXML = ObjCreate("Microsoft.XMLDOM") $oXML2 = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf InetGet("http://javadl-esd.sun.com/update/1.7.0/map-m-1.7.0.xml", @DesktopDir & "\xml1.xml") $oXML.Load(@DesktopDir & "\xml1.xml") ; used when loading a downloaded file $oLastUpdate = $oXML.lastChild.lastChild.selectSingleNode("url") ConsoleWrite($oLastUpdate.text) InetGet($oLastUpdate.text, @DesktopDir & "\xml2.xml") $oXML2.Load(@DesktopDir & "\xml2.xml") ; used when loading a downloaded file ;~ ConsoleWrite($oXML.xML) For $oParent In $oXML2.selectNodes( '//information[@xml:lang="en"]' ) $sLanguage = $oParent.getAttribute("xml:lang") $oChild = $oParent.selectSingleNode('./version') If IsObj($oChild) Then $sVersionText = $oChild.Text ConsoleWrite("Language=[" & $sLanguage & "]...Version=[" & $sVersionText & "]" & @crlf) Else ConsoleWrite("Language=[" & $sLanguage & "]...No version" & @CRLF) EndIf Next ConsoleWrite($sVersionText & @CRLF) This is a sure thing...who knows when they will change the version text structure...this is blind to that structure (as long as they don't update the xml ) output (didn't include a @crlf on the first consolewrite): https://javadl-esd-secure.oracle.com/update/1.7.0/au-descriptor-1.7.0_25-b17.xmlLanguage=[en]...Version=[1.7.0_25-b17] 1.7.0_25-b17 edit: and oh, you asked the question fine, I'm a serial "not read the full question" kind of guy...I just see what I like, and run with it Edited June 26, 2013 by jdelaney Rex 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Rex Posted June 26, 2013 Author Share Posted June 26, 2013 (edited) here we go...just grabbing the LAST one: $oXML = ObjCreate("Microsoft.XMLDOM") $oXML2 = ObjCreate("Microsoft.XMLDOM") If Not IsObj($oXML) Then MsgBox(0, "", "Unable to create COM session to XML.") Exit EndIf InetGet("http://javadl-esd.sun.com/update/1.7.0/map-m-1.7.0.xml", @DesktopDir & "\xml1.xml") $oXML.Load(@DesktopDir & "\xml1.xml") ; used when loading a downloaded file $oLastUpdate = $oXML.lastChild.lastChild.selectSingleNode("url") ConsoleWrite($oLastUpdate.text) InetGet($oLastUpdate.text, @DesktopDir & "\xml2.xml") $oXML2.Load(@DesktopDir & "\xml2.xml") ; used when loading a downloaded file ;~ ConsoleWrite($oXML.xML) For $oParent In $oXML2.selectNodes( '//information[@xml:lang="en"]' ) $sLanguage = $oParent.getAttribute("xml:lang") $oChild = $oParent.selectSingleNode('./version') If IsObj($oChild) Then $sVersionText = $oChild.Text ConsoleWrite("Language=[" & $sLanguage & "]...Version=[" & $sVersionText & "]" & @crlf) Else ConsoleWrite("Language=[" & $sLanguage & "]...No version" & @CRLF) EndIf Next ConsoleWrite($sVersionText & @CRLF) This is a sure thing...who knows when they will change the version text structure...this is blind to that structure (as long as they don't update the xml ) Hi Tried to edit my prev. post, but ???? happened. I don't think that the will change the file layout anytime soon, but it's Java so nobody knows The script work like a charm, thx jdelaney edit: and oh, you asked the question fine, I'm a serial "not read the full question" kind of guy...I just see what I like, and run with it Ahh oki ;-) Cheers c;") /Rex Edited June 26, 2013 by Rex Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 Do you still want/need a regular expression version? Or is the topic solved? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Rex Posted June 27, 2013 Author Share Posted June 27, 2013 Hi Guinness Was wandering if you would show up If you have a suggestion on the repexp i would be happy to see it, that way i still can check if the file format changes and also maybe learn some more regexp expressions Cheers c;") /Rex Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 (edited) I don't disappoint. If I have time I will have a look, but right now I'm a little busy. Edited June 27, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
mikell Posted June 27, 2013 Share Posted June 27, 2013 (edited) [under the control of Guiness] this simple sre should work $file = BinaryToString(InetRead("http://javadl-esd.sun.com/update/1.7.0/map-m-1.7.0.xml")) Msgbox(0,"", StringRegExpReplace($file, '(?s).+?descriptor-(.+?)\.xml.+', "$1")) as long as the xml keeps the same structure Edited June 27, 2013 by mikell Link to comment Share on other sites More sharing options...
guinness Posted June 27, 2013 Share Posted June 27, 2013 Hey! I don't want to be the Jedi master of regular expressions. -_0 With great knowledge comes great responsibility (which I don't want.) UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Rex Posted June 27, 2013 Author Share Posted June 27, 2013 I don't disappoint. If I have time I will have a look, but right now I'm a little busy. np, the xml ver. from jdelaney works nicly - it was more my curiosity on how to do it with regex. Cheers c;") /Rex 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