Groovyの正規表現(部分一致/完全一致)
def str = "abc9def" assert (str =~ /[a-z]+/) as boolean == true // 部分一致 assert (str ==~ /[a-z]+/) as boolean == false // 完全一致
=~ だと部分一致
==~ だと完全一致
def str = "abc9def" assert (str =~ /[a-z]+/) as boolean == true // 部分一致 assert (str ==~ /[a-z]+/) as boolean == false // 完全一致
=~ だと部分一致
==~ だと完全一致