我第一次尝试在Xcode中使用CocoaPods,但在尝试安装pod时遇到错误。
我安装了最新版本的Cocoapods。我使用终端导航到我的Xcode项目的文件夹,并使用pod init创建一个Podfile。
在此之后,我打开Podfile,包含安装我正在寻找的pod所需的所有代码,然后在同一目录中使用pod install。
此时,我得到以下错误:
[!] No `Podfile' found in the project directory.
然而,当我再次尝试pod init时,它告诉我:
[!] Existing Podfile found in directory
因此,它
我有以下表达式:[^(\r\n)]*来识别任何不包含\r\n的文本。但是,当文本包含(或)时,则无法识别。
示例:
"I have following expression to recognize any text."将被确认为OK。
"I have following expression (A) to recognize any text."将不被识别。
因此,我想要全文:"I have following expression (A) to recognize any text."
我只是做了一些工作,并对结果感到惊讶。让我解释一下。
String str = "aaa.jpg";
String[] str1 = str.split("."); //output of this is empty array with size 0
str.contains("."); //output of this is true.
谁能解释一下,为什么split()方法不能识别".",其中contains()可以识别"."。