1

Good day,

Can someone help me in the right direction here.

I have a string:

Task 10001:Bring cooldrinks
Task 10005:Waffle Iron,
this should of course be cleaned    
Task 10006:Remember Wife
Task 10000:Leave children

How do I break it up so that I can stick it per task into a list like:

List(0) = Task 10001: Bring cooldrinks
List(1) = Task 10005:Waffle Iron,this should of course be cleaned    
List(2) = Task 10006: Remember Wife
List(3) = Task 10000: Leave children

I would always receive the string like Task [number]: [Message]

Those inside the [] is the variables that will differ.

4

3 に答える 3

0

正規表現の利点は、すべての悪い行をフィルター処理することです。柄が合わないからです。

のようなもの:^Task\s\d+:.+やります

于 2013-09-26T13:43:54.153 に答える