I have set of
String x = "‘Gravity’ tops the box office for 3rd week | New York Post"
" characters are always going to be the first and last ones, you don't need a regex. Just use
x = x.substring(1, x.length() - 1)