title: java regex find first and last characters
body: <p>I'm writing a program that determines if a string is a palindrome recursively. I've decided to try and use regex, but I'm having a bit of trouble understanding the syntax. What I need to do is compare the first and last char to see if they are identical. How can I go about doing this?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: I found this helpful: <a href="https://stackoverflow.com/a/233296/1552271">AirSource Ltd's answer to Degvik's question</a></p>