iOS实现html链接a标签正则匹配,高亮

2016-12-17
阅读 4 分钟
9.4k
需求:匹配文本内容中的标签,然后高亮显示出来。 运行环境:XCode8.1, iPhone7-iOS10.1第三方类库框架: YYText: 富文本渲染类库框架 Github地址 RegexKitLite: 封装了正则匹配操作的方法 Github地址

Javascript 正则使用第一篇

2014-05-10
阅读 4 分钟
2.4k
@param p3 The nth parenthesized submatch string, provided the first argument to replace was a RegExp object. (Corresponds to $1, $2, etc. above.) For example, if /(\a+)(\b+)/, was given, p1 is the match for \a+, and p2 for \b+.