Simple scala regex does not work

This returns false i don’t understand why. They should match


There is a mistake: [A-Z] only matches one character. The following works



1 Like

That regex only matches one capital letter followed by a ‘?’. You
probably want


or something else to make it match with more letters before the ‘?’.

Sorry my bad i was trying to condense what i really wanted to test and made a mistake. Problem solved. Thanks all!