REGex getting all file in a folder
Hi To all,
I got problem using regex on how to download all text file in one folder
im using this as my reference
Dim RegexObj As New Regex("<*""(?<path>[^""]*txt)"">(?<fileName>[^.txt]+$)</A>")
Dim MatchResults As Match = RegexObj.Match(htmlcontent)
Dim matchCount = RegexObj.Matches(htmlcontent).Count
Me.ProgressBar1.Maximum = matchCount
here is the list i want to get
here's the url of the items http://goo.gl/nL3dEk
callcards_prod.txt
cignal_pldt_meralco.txt
gaming_prod.txt
globe_eload_prod.txt
internet_prod.txt
other_prod.txt
satellite_prod.txt
smart_pldt_eload.txt
sun_eload_prod.txt
thank in advance
Re: REGex getting all file in a folder
This RegEx example will give you all the anchor elements:
Code:
(<a href=".+\.txt">.*<\/a>)
If you don't care for the elements and only want the innerHTML then give this a try:
Code:
(?<=<a href=".+\.txt">)(.*?)(?=<\/a>)
Just remember to double up the quotation marks.
Re: REGex getting all file in a folder
thanks dday9 hope it works