Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2.7.2 :006 > s = "Type: MHT 860L, year 2010, 7436 hours, 4x4x4, extra pipes, tyres 445/65 R 22,5, q/c with bucket and forks\n2020"
- => "Type: MHT 860L, year 2010, 7436 hours, 4x4x4, extra pipes, tyres 445/65 R 22,5, q/c with bucket and forks\n2020"
- 2.7.2 :007 > puts s
- Type: MHT 860L, year 2010, 7436 hours, 4x4x4, extra pipes, tyres 445/65 R 22,5, q/c with bucket and forks
- 2020
- => nil
- 2.7.2 :008 > s.sub /\d+\z/, ''
- => "Type: MHT 860L, year 2010, 7436 hours, 4x4x4, extra pipes, tyres 445/65 R 22,5, q/c with bucket and forks\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement