import re

romanNumeralRegex = re.compile( "(?:.*\s+\(?)(([(?=[mclxvi])m*(c[md]|d?c*)(x[cl]|l?x*)(i[xv]|v?i*))(?:\.\s.*)", re.IGNORECASE )
romanNumeralChapterVerseRegex = re.compile( "(?:.*\s+\(?)(([(?=[mdclxvi])m*(c[md]|d?c*)(x[cl]|l?x*)(i[xv]|v?i*)(\.\s[0123456789]?[0123456789]))(?:.*)", re.IGNORECASE )

def regexMatchesRomanNumeral( value ):
    return romanNumeralRegex.match( value ) != None

def regexMatchesRomanNumeralChapterVerse( value ):
    return romanNumeralChapterVerseRegex.match( value ) != None

def regexFindAllRomanNumeral( value ):
    return romanNumeralRegex.findall( value )

def regexFindAllRomanNumeralChapterVerse( value ):
    return romanNumeralChapterVerseRegex.findall( value )

