Friday, February 15, 2019

Regex pattern for image (not link)

Can anyone give me the pattern of the regex to get all the local images ONLY. :(
I'm using the code below but it includes the image links.




  Regex rgx = new Regex("[^\\/:*?\"<>|]+\\.(?i)(jpg|png|gif|bmp)", RegexOptions.IgnoreCase);


input:



 http://dl9.glitter-graphics.net/pub/846/846279rr8zhg26y6.gif
images/strawberries.jpg


output:




 846279rr8zhg26y6.gif
strawberries.jpg


I don't want the 846279rr8zhg26y6.gif

No comments:

Post a Comment

plot explanation - Why did Peaches&#39; mom hang on the tree? - Movies &amp; TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...