I have a text line read from a HTML page, example:
I want to extract the filename and have been using the FlickrViewer as basic code. I have only made a few minor changes to the HandleMainPage sub.
My catch pattern is as follow:
The regex command should pull out the filename as commented in pattern above.
The problem is that it doesn't work, my pattern is wrong.
I have traced the problem to the "-" in the filename but I cannot change this, the files are on a public server. Using a workaround I replaced the "-" with a "_" and then everything works.
Does anyone have a better mask for the pattern variable?
Thanks, Mark
B4X:
line="<p><a href="thumbs/leralyn-1-7892.jpg"><img alt="" src="thumbs/leralyn-1.jpg" border="2" height="284" width="200"></a><br>"
I want to extract the filename and have been using the FlickrViewer as basic code. I have only made a few minor changes to the HandleMainPage sub.
My catch pattern is as follow:
B4X:
pattern="<a href=qthumbs/\w+\.jpgq".Replace("q", QUOTE) '<a href="thumbs/somename.jpg">
The regex command should pull out the filename as commented in pattern above.
B4X:
m = Regex.Matcher(pattern, line)
The problem is that it doesn't work, my pattern is wrong.
I have traced the problem to the "-" in the filename but I cannot change this, the files are on a public server. Using a workaround I replaced the "-" with a "_" and then everything works.
Does anyone have a better mask for the pattern variable?
Thanks, Mark