regex - How can I match all images without thumb image using regexp -


how can match images without thumb image using regexp ?

hi.gif thumb.gif hello.gif 

result should :

hi.gif hello.gif 

i using .+(gif|gif|jpg|jpg) match images

you can use -ve lookahead assertion as:

^(?!thumb).+\.(?:gif|gif|jpg|jpg)$ 

rubular link

regexr link


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -