title: Regex: Exact number of symbols and lines
body: <p>I would like to use regex in Java to substring text.
  The string must be max 140 characters in all ( not counting  new line/enter characters) and there might be max 4 lines</p>
  
  <p>I found out how to substring 140 symbols: ^(.|\n|\r){0,140}
  My question is how to add limitation for only 4 lines 
  and exclude new line/enter characters</p>
  
  <p>Thanks for help!</p>