简体   繁体   English

正则表达式从区分大小写变为不区分大小写

[英]Regex from case-sensitive to non-case sensitive

I had an .APK file that has folders and documents with capital letters in it. 我有一个.APK文件,其中包含带有大写字母的文件夹和文档。 Example, icon_RED.png. 例如,icon_RED.png。 I change this name to icon_red.png. 我将此名称更改为icon_red.png。 Now, of course, any document or different drawable (mdpi, xdpi, xxdpi, etc.) will be calling icon_RED.png, not icon_red.png. 现在,当然,任何文档或其他可绘制对象(mdpi,xdpi,xxdpi等)都将调用icon_RED.png,而不是icon_red.png。 There is something I believe with the "regex" that causes it to be "case insensitive". 我相信“正则表达式”会使它“不区分大小写”。 Is there a way to make it not case sensitive? 有没有办法使它不区分大小写? So if it is calling icon_red.png or icon_RED.png or icON_ReD.png it will direct to the same file, icon_red.png. 因此,如果调用的是icon_red.png或icon_RED.png或icON_ReD.png,它将定向到同一文件icon_red.png。 If there is any way to do this or need any information on what I mean, please let me know. 如果有任何方法可以执行此操作,或者需要任何有关我的意思的信息,请告诉我。 Here is the initial error that is generated from changing a file. 这是更改文件时产生的初始错误。

W: C:\Users\Owner\Desktop\apktool\r\res\drawable-hdpi\admin_PIKEK.png: error: File is case-insensitive equivalent to: C:\Users\Owner\Desktop\apktool\r\res\drawable\admin_pikek.png

You need to rename all of your icon_RED.png files in your res folder (in the different density folders) to icon_red.png , not just one of them. 您需要将res文件夹(位于不同密度文件夹中)中的所有icon_RED.png文件重命名为icon_red.png ,而不仅仅是其中之一。

Android resources should be all lowercase - see https://groups.google.com/forum/#!topic/android-developers/0g3SUA3yoCk for a discussion on why that is. Android资源应全部为小写字母-有关原因的讨论,请参见https://groups.google.com/forum/#!topic/android-developers/0g3SUA3yoCk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM