fix regex with tests
Merge pull request #39 from CapillarySoftware/fix_partition_detection

fix regex with tests