正则表达式匹配包含单词的文件名,无论大小写

tzi*_*ppy 2 regex

我需要一个正则表达式匹配所有情况下.png包含该单词的类型的任何文件名icon.所以它应该匹配

icon.png
myicon.png
thisIcon.PnG
aniCon_this.png
ANYICON.PNG
iconno2@me.png
Run Code Online (Sandbox Code Playgroud)

任何帮助赞赏!! 谢谢!PS:我在java

Bra*_*tie 7

就像@Sebastian P提到的那样:

/^.*icon.*\.png$/i
Run Code Online (Sandbox Code Playgroud)

除了我在末尾添加i标志以将其标记为不区分大小写.