title: Common Regular Expression for java and Javascript
body: <p>I am looking to have a common framework to write some syntactic validation rules in regular expressions so that I can use them in both frontend and backend.
  I am using javascript for the front end and java for the backend.
  I want to do a form submission on the front end, but before submitting the form, I need to perform some syntactic rule checking. When request come to the backend, I want the same set of rules to be evaluated.</p>
  <p>I want to put these rules at one common place where javascript and java code can load from so that I only need to change the rules at this common place and they will be reflected to both the frameworks.</p>