My goal is to come up with a regex pattern that allows any string beginning with "B-" to match. I.e., the strings "B-17" and "B-hithere" should both match.
I'm in an environment where I
mustJakarta regex library. Regexp is found at
the Jakarta regexp home page I can't figure out how to code the regex pattern.
Here's a simple example. I thought this would be a literal pattern. I.e., the only thing that should match the pattern "B-aa" should be the string "B-aa" itself; but other things match.
Why are so many strings matching? (How do I get it to treat "B-" as a literal?
Thanks for helping!