开发者

Replacing text with Regex

I have a text file that contains a data dump from a database. This开发者_运维技巧 is space delimited and as stupid as this sounds, this is what I have to work with. The problem that I have is that there's a free textfield that includes newlines.

So what I would try to do is replace every \r that is not followed by an id that matches the following pattern [0-9]{6}


If the tool you are working with support regular expression with look-around assertions, you could use

\r(?!\d{6})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜