I have a text, example:
Hello ../aaa.jpg ../bbb.jpg ../sss.gif ../xxx.png End of Text
I want to get all text with extension jpg and png.
Expected result:
1. ../aaa
2. ../bbb
3. ../xxx
I try with .match(/(.*).(jpg|png)/), but it seems not working as expected