I need a regular expression for sed which will skip lines that start with a digit and end with a period.

1 The quick brown fox jumped over the lazy dogs back 1234567890 The quick brown fox jumped over the lazy dogs back 1234567890. The quick brown fox jumped over the lazy dogs back 1234567890 4 The quick brown fox jumped over the lazy dogs back 1234567890. 

it is difficult to skip only the 4th line

  • To skip is to display or not to display? - 0andriy
  • But in general - man grep . - 0andriy

1 answer 1

somewhere so

 sed -n '/^[0-9].*\.$/!p' file.txt 

!p inverts the print condition. You can turn the condition and

 sed -n '/^[^0-9].*[^\.]$/p' ix.txt 
  • Thank you very much. But how to learn to do it yourself? - SkiF
  • Look for the book "Friedl regular expressions". - KoVadim
  • it missed "40-pin GPIO header detected" - SkiF
  • logical - no point at the end - KoVadim
  • I need to let "96 The quick brown fox jumped over the lazy dogs back 1234567890." and such 25,000, but did not miss anything else. - SkiF