There are some perl regular expressions that I need to convert to Java regular expressions. I'm new to Java and don't know much about Java regexes.
Regex that I want to convert are very similar to this
Text =~ /(^FOO[0-9]{4})|(^BAR[0-9]{3})/
See if string matches to either FOO4823
BAR943
(FOO
and 4 numbers or BAR
and 3 numbers). How would I rewrite this in Java? Are there any simple rules to convert them?