【发布时间】:2012-01-02 06:09:57
【问题描述】:
获取给定文本字符串的搜索短语的所有字符位置的最佳方法是什么?
例如,假设我们有"the red cat is watching the red car stopped at the red stop sign"
输入:“红色” 输出:[5、29、52]
【问题讨论】:
标签: java regex string-matching indexof
获取给定文本字符串的搜索短语的所有字符位置的最佳方法是什么?
例如,假设我们有"the red cat is watching the red car stopped at the red stop sign"
输入:“红色” 输出:[5、29、52]
【问题讨论】:
标签: java regex string-matching indexof