I am trying to match the Roman number from the I to IX with a regex.

val pattern = "(\\sI\\s|\\sII\\s|\\sIII\\s|\\sIV\\s|\\sV\\s|\\sVI\\s|\\sVII\\s|\\sVIII\\s|\\sIX\\s)".r

This can only matches the upper case. I want to ignore the case.

My test string is "Mark iii ".

Edit
Report