I am trying to convert JavaScript regular expression to java regular expression. here is my current javascript regular expression that I am trying to convert :
var re = /\a(?![^<]*>)/g;
I have searched and found out that I need to change the back-slash / into double back-slashes // and start with "
but what about /g at the end? do we need to change it too?
Thank you
The downvote is probably because your question is poorly written and poorly researched. (And it probably means that people think your question wouldn't be useful for others in the future. Not least because the writing is unclear ... and (based on the comments on the answer) the regex is not correct in Javascript either.
What is the purpose of escaping the letter a in a regex? In JS, /\a/.exec("\\a")[0] => "a". Java regex engine does not treat \a in any special way either.