Some netizens have encountered such a problem: how to use regular matching suffix name is not. jpg,. css,. js,. html,. htm,. png files, the problem details are:
How do I use regular matching suffix names for. jpg,. css,. js,. html,. htm,. png files?
, I search you through the Internet to collect some of the relevant solutions, hope to have the same or similar problems to help users, as follows:
Solution 1:
---total 3 reviews---
- Chief of the skin find. -type f-name "*.odt"-o-name "*.exe" (4 years ago) reply
- Gross find is not paying for this complex regular (4 years ago) reply
- Patriot Find/usr/local/apache2/htdocs-type F-regex '. *\. (?:(?! (Jpg|css|js|html|htm|png)).) + ' seems not work (4 years ago) reply
Solution 2:
Here you go ...
Find. -type f \ (!-iname "*.css"!-iname "*.png"!-iname "*.jpg"! "-iname" *.js "!-iname" *.html "!-iname" *.htm "\)
Regular expressions determine if the file name suffix is csv xls xlsx
/\. (?: csv|xls|xlsx) $/i
System.out.println ("Abc.jpg". Matches (". *\\." (? (i) JPG "));
How to use regular matching suffix names not. jpg,. css,. js,. html,. htm,. png files