Skip to content

Commit e555e5b

Browse files
committed
2 parents 961242a + d3d8f34 commit e555e5b

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,17 @@ pod 'SJAttributesStringMaker'
2222
```
2323
___
2424

25-
### 关于v1版本
26-
27-
```ruby
28-
// 抱歉各位, 由于结构调整, `v1``v2`版本差距较大, 大家可以如下方式, 继续使用`v1`版本的.
29-
 pod 'SJAttributesFactory', '1.1.14'
30-
```
31-
___
32-
3325
### regular expression
3426
<img src="https://github.com/changsanjiang/SJAttributesFactory/blob/master/Demo/SJAttributesFactory/regular.jpeg" />
3527

3628
```Objective-C
3729
sj_makeAttributesString(^(SJAttributeWorker * _Nonnull make) {
3830
make.insert(@"@迷你世界联机 :@江叔 用小淘气耍赖野人#迷你世界#", 0);
3931

40-
make.regexp(@"[@][^\\s]+\\s", ^(SJAttributesRangeOperator * _Nonnull matched) {
32+
make.regexp(@"@\\w+", ^(SJAttributesRangeOperator * _Nonnull matched) {
4133
matched.textColor([UIColor purpleColor]);
4234
});
43-
make.regexp(@"[#][^#]+#", ^(SJAttributesRangeOperator * _Nonnull matched) {
35+
make.regexp(@"#[^#]+#", ^(SJAttributesRangeOperator * _Nonnull matched) {
4436
matched.textColor([UIColor orangeColor]);
4537
});
4638
});

0 commit comments

Comments
 (0)