title: java equivalent of mysql string search operator 'like'
body: <p>Edit: thanks for the reg answers below.
  What if my goal is to strictly emulate mysql like operator,which seems to ignore \n in between characters?</p>
  
  <p>what's java equivalent of mysql string search operator 'like'?</p>
  
  <p>I need to search for strings that might have \n end of line or other white spaces between them.
  for example,
  abc\n
  efg</p>
  
  <p>string.indexOf("abcefg") doesn't work.</p>