I use the MatchesMask function to filter out unwanted lines.

The text of this plan:

 txt11.txt221.txt325.txt4:5787899 (тут без пробела в конце строки) txt11.txt221.txt325.txt4:578799 (А тут есть пробел в конце строки) txt11.txt221.txt325.txt4:57878 dsdsssdwddwdww 

The output should be (that is, the condition (after the ":" and "numbers" - if there are letters then this - weed out the line):

 txt11.txt221.txt325.txt4:5787899 txt11.txt221.txt325.txt4:578799 

I use this plan - filter: *

 if MatchesMask(s,'*.*.*.*[:]*') then writeln(f2, S); 

But nothing comes out, just 3 lines are copied. Maybe there is a filter for this function, who can tell?

  • one
    All strings are matched. State what the third is bad. - MBo
  • @MBo, but I just need to do this: What if after: 578799 (that is, the condition (after ":" and "numbers" - if there are letters then this - weed out the line). - Tatiana
  • one
    Some options can be cut off if MatchesMask(s,'*.*.*.*[:]*[0-9][!az]') . In general, the MatchesMask language is not a primitive, difficult result, so more regular are regulars or, in this case, the zed-a variant - MBo
  • one
    But the zed function from the last branch is fast. - MBo
  • 2
    Duck you and leave that quick function, just supplement it with a new condition. Let the basic filtering be done by that fast algorithm. - teran

0