FranciscoR Posted January 27, 2009 Report Share Posted January 27, 2009 <?xml version="1.0" encoding="utf-16"?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <HttpReferer /> <Variables> <item> <key> <string>version</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>(?:<td>.{0,4}?(?:\w+?\s){1,5})+?(?:v)(\d{1,2}\p{P}\d\d)</Regex> <Url><placeholder name="Application Page URL" /></Url> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>app</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>(?:<a class=.+?)(?:href=")(\w+\p{P}zip)(?:\")</Regex> <Url><placeholder name="Application Page URL" /></Url> <Name>app</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <Category>Nirsofer</Category> <SourceType>FixedUrl</SourceType> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated xsi:nil="true" /> <TargetPath>{target}\{category}\{appname}_{version}.{url:ext}</TargetPath> <FixedDownloadUrl>http://www.nirsoft.net/utils/{app}</FixedDownloadUrl> <Name><placeholder name="Application Name" /></Name> </ApplicationJob> </Jobs> Insert App Page URL and App name. App Page URL example: http://www.nirsoft.net/utils/mspass.html Note: only for 32-bit portable apps. Regex was tested against several urls in this site retrieving NO error (24-01-2009). Link to comment Share on other sites More sharing options...
CybTekSol Posted January 27, 2009 Report Share Posted January 27, 2009 @FranciscoR, THANKS for you effort... I will try to test it in the next few days! Link to comment Share on other sites More sharing options...
FranciscoR Posted January 27, 2009 Author Report Share Posted January 27, 2009 This is no big deal and there's certainly no comparison with your own templates... for me this is usefull because like this I only have to import one single template with customized tags (including commands), insert url and name, push update and everything else is done in a breeze. Btw, if there is demand, I can also provide a 64-bit version of it. Link to comment Share on other sites More sharing options...
FranciscoR Posted January 31, 2009 Author Report Share Posted January 31, 2009 Notice: today I updated 3 files to the same version, so I thought there was an error on XML. There isn't; although release date is unchanged, 25/01/2009, files where updated on the Nirsofer server on 28/01/2009 and 29/01/2009. Link to comment Share on other sites More sharing options...
Guest Guest Posted April 18, 2012 Report Share Posted April 18, 2012 Just tried this, and Ketarin complains of a stray tag in line 18-- is it misinterpreting the regular expression characters? I'm not an XML expert- can anyone help? Link to comment Share on other sites More sharing options...
aurelio Posted April 18, 2012 Report Share Posted April 18, 2012 Just tried this, and Ketarin complains of a stray tag in line 18-- is it misinterpreting the regular expression characters? I'm not an XML expert- can anyone help? I'm not exactly "an expert" but I believe (judging from my own experiences with Ketarin) that it may very well be "picking" on the "regex quantifier" on that line (e.g.: "{0,4}" or "{1,5}" right after) - my solution in all cases were this was true was to either eliminate the quantifier, substituting it for an "+" (ilimited, greedy), or just try to "escape" the all "{" characters (JUST IN REGEX QUANTIFIERS!!! NOT IN VARIABLES!), e.g. "\{". Also, if you're editing directly (manually, in notepad) your .XML files, there's some characters that should be "converted". e.g.: "<" becomes "<" (html 'lesser than') and ">" becomes ">" (html 'greater than') inside the "values" of any field, in this case, the "Regex" field, noted by <Regex> (start of the field) and </Regex> (end of the field). So, line 18 could become: <Regex>(?:<td>.\{0,4}?(?:\w+?\s)\{1,5})+?(?:v)(\d\{1,2}\p{P}\d\d)</Regex> INSTEAD OF: <Regex>(?:<td>.{0,4}?(?:\w+?\s){1,5})+?(?:v)(\d{1,2}\p{P}\d\d)</td></Regex> 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