问题描述
考虑一个字符串:
<! Women's boxing is yet to be recognized as an Olympic support,----. If that happens the dream of most of the tough girls may come true. !> <! dream of most of the tough girls may come true. !> <! Women's boxing is yet to be recognized as an Olympic support. !>
在上面的字符串中,我使用了 作为指定段落边界的分隔符,从字符串中可以明显看出我在分隔符内有 3+1 组封闭语句。
我用来捕获组的正则表达式是
<!([^<!>].+)!>
它匹配的组是:
Group 1: <! Women's boxing is yet to be recognized as an Olympic support,----. If that happens the dream of most of the tough girls may come true. !> <! dream of most of the tough girls may come true. !> <! Women's boxing is yet to be recognized as an Olympic support. !>
Group 2: Women's boxing is yet to be recognized as an Olympic support,----. If that happens the dream of most of the tough girls may come true. !> <! dream of most of the tough girls may come true. !> <! Women's boxing is yet to be recognized as an Olympic support.
我假设匹配包含三个内部组,但它匹配它只包含外部组作为输出。 这是我期待的
//other groups
Women's boxing is yet to be recognized as an Olympic support,----. If that happens the dream of most of the tough girls may come true.
dream of most of the tough girls may come true.
Women's boxing is yet to be recognized as an Olympic support.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)