Everything is explained here:
https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md#the-token-fileFor example:
- $ at the end of a line for setting this as the last token (i.e. what your password ends with)
- ^ at the beginning of a line for setting this as the first token (i.e. what your password starts with)
- %2,4d for a wildcard which means 2 to 4 digits
- %A for an uppercase letter
So your token file should at least contain the following:
^%A (starts with uppercase letter)
%2,4d$ (ends with 2 to 4 digits)
You can exclude characters by simply not including them (i.e. you set beginning anchor (uppercase letter), ending anchor (2-4 digits) and set X-Y characters of your charset (e.g. 0-9a-z) in between).
If you can't figure the remaining ones out yourself, please describe your password more precisely. With "8 digits may be 10", do you refer to only digits (numbers) ? Or are you referring to letters and digits ?
If for example your overall password is 8-10 chars long and you know the first is uppercase letter and the last 2-4 is digits, and in the middle you have 0-9, a-z and A-Z, you can add:
This will give you 3-7 chars from the charset (0-9, a-z, A-Z)
Then, your token file could look like this:
^%A (starts with uppercase letter)
%2,4d$ (ends with 2 to 4 digits)
%3,7i[0-9a-f] (3 to 7 characters of 0-9, a-z, A-Z (not at the beginning and not and the end))
This is not optimized yet, since it tests unnecessary combinations (e.g. 4 digits and 7 chars in the middle, which results in a length of 12).
You could enhance this with mutual exclusions (
https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md#mutual-exclusion).
This should you just give an idea how to construct it.