<div dir="ltr">Seems like there is something that I misunderstood badly here. Here's an example that I don't understand:<div><br></div><div>I created a text file to use for this example. Its name is ”x” and it looks like this:</div><div><div>x|2:31,93|x</div><div>x|2:04,59|x</div><div>x|10:03,93|x</div><div>x|2:12,75|x</div><div>x|2:33,29|x</div><div>x|2:25,70|x</div></div><div><br></div><div>The numbers are times in minutes and seconds and 1/100-seconds. I use a decimal comma, since we do that in my country.</div><div><br></div><div>Now I want to separate the times from the rest with sed. There are many ways to do this, and awk is probably easier in this example, but this is only an example. My real files have much longer lines so I made this file since its lines are very much shorter…</div><div><br></div><div>So I use the following command:</div><div>sed -r 's/.*([0-9]{1,2}:[0-9]{2},[0-9]{2}).*/\1/' x<br></div><div>So I'm looking for something one or two digits followed by a colon, then two digits followed by a comma and another two digits.</div><div><br></div><div>I expected this output:</div><div><div>2:31,93</div><div>2:04,59</div><div>10:03,93</div><div>2:12,75</div><div>2:33,29</div><div>2:25,70</div></div><div><br></div><div>However, this is what I got:</div><div><div>2:31,93</div><div>2:04,59</div><div>0:03,93</div><div>2:12,75</div><div>2:33,29</div><div>2:25,70</div></div><div><br></div><div>Why is one digit missing in the third line?</div><div><br></div><div><br></div><div><div>Kind regards</div><div><br></div><div>Johnny Rosenberg</div><div>ジョニー・ローゼンバーグ</div></div><div><br></div><div><br></div></div>