Jump to content
Sign in to follow this  
gcue

getting Bloomberg update from site

Recommended Posts

gcue

hello.

i am trying to download Bloomberg update from their site. they often change the date format which the update filename contains.

for example last month it was

upgr080711.exe

and this month its

upgr08072011.exe

so i often have to switch this to accomodate

StringRegExp($sHTML, "http://bdn-ak.bloomberg.com/software/trv/bupd\d\d\d\d\d\d.exe", 2)

is there something that will work for both date formats (wether they are 6 digits or 8)?

thanks =)

Share this post


Link to post
Share on other sites
kaotkbliss

I'm not good with StringregExp yet, but I remember something about getting all character between 2 non capture groups which in your example, looks like upgr and .exe

hopefully it helps.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
PowerCat

My lazy way:

$mark1 = StringinStr($shtml, "software/trv/bupd")

$mark2 = StringinStr($html, ".exe", 0, 1, $mark1)

$url = StringMid($sHTML, $mark1, $mark2 - $mark1)

Then add what you need.

Share this post


Link to post
Share on other sites
gcue

thanks for your help but doesn't it seem a bit messy? wouldnt stringregexp be cleaner and safer? :mellow:

Edited by gcue

Share this post


Link to post
Share on other sites
PowerCat

thanks for your help but doesn't it seem a bit messy? wouldnt stringregexp be cleaner and safer? :mellow:

Well yes, it's dirty. But it works, right? :)

Share this post


Link to post
Share on other sites
gcue

this looks to be working!

StringRegExp($sHTML, "http://bdn-ak.bloomberg.com/software/trv/bupd[\d]+.exe", 2)

thanks again for the leads/help

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×