👍可以了
不过现在好像没法导入内部含有双引号的数据:
You can ignore bad data by setting BadDataFound to null. IReader state: ColumnCount: 0 CurrentIndex: 1 HeaderRecord: ["pattern","replacement","name"] IParser state: ByteCount: 0 CharCount: 197 Row: 5 RawRow: 5 Count: 3 RawRecord: ^(\s*)(.*?)(\s*)$ $1<span class="red">$2</span>$3 red
数据是:
pattern replacement name ^(\s*)(.*?)(\s*)$ $2 trim ^(\s*)(.*?)(\s*)$ $1<i>$2</i>$3 <i> ^(\s*)(.*?)(\s*)$ $1<code>$2</code>$3 <code> ^(\s*)(.*?)(\s*)$ $1<span class="red">$2</span>$3 red
可以的话能否将引号处理也作为一个自定义选项?
补充:要实现导入也是可以的,但是需要转义为
pattern replacement name ^(\s*)(.*?)(\s*)$ $2 trim ^(\s*)(.*?)(\s*)$ $1<i>$2</i>$3 <i> ^(\s*)(.*?)(\s*)$ $1<code>$2</code>$3 <code> ^(\s*)(.*?)(\s*)$ "$1<span class=""red"">$2</span>$3" red
只是对于已有的数据来说,手动转义起来比较困难