I try to implement regex that will match romanian numbers in text. Here is my regex:
^ | \s+[xivXIV]+\s+ | $
So it mean 'Begin string or whitespace one or more times, than any of xivXIV one or more times, then whitespace one or more times or string end.'
But it seems its not work for me.
F.e. i have a simple string 'xiv'
and it not matched against this pattern.
EDIT: Suggested post is about how if string literal match to romanian number, instead i want to 'smart' extract those literals from text, so it should handle cases like
'visit'
it should not take 'vi'
but if 'ix table of contents'
it should take 'ix'
EDIT 2: Thanks to all replies, the exp should be:
\b[xivXIV]+\b
NOTE: in my part case i only need handle XIV literals (not full romanian system) thats because i need some simpler solution