我想拥有多个捕获组,这些捕获组可以是可选的,我想访问它们对应的字符串。 东西看起来/是这样工作的: let text1 = "something with foo and bar"
let text2 = "something with just bar"
let regex = NSRegularExpression(pattern: "(foo)? (bar)")
for (first
什么是Java做的弦乐以下替换的最佳方式: 我的文字,看起来与此类似: one two [[**my_word** other words]] three four [[**my_other_word** other words]] five six
,我想以下文本 one two **my_word** three four **my_other_word** five six
我试过使