The regular expression strings describing rows that can be matched as 'musical' can be specified using the following characters:
Representing a bell:
1234567890ETABCDFGHJKLMNPQRSUVWYZ
Representing any bell:
?
Representing any bells in any order:
*
Representing one of several bells in a set position:
[34]
These constructs can be formed into the following (in all these cases we are matching with a 6 bell method):
"12??56" In this case we are wishing to know how many rows occur that are 124356 or 123456.
"135246" In this case we are wishing to know how many times queens occur.
"*456" In this case we wish to know how many rows there are that finish in 456.
"654*" In this case we wish to know how many rows there are that start with 654.
"*456*" In this case we wish to know how many rows have 456 in the middle of them, note this includes rows that start 456 and end 456 as well.
"*[56]78" in this case we wish to know how many rows end in 578 or 678.