MaskProcessor Optional Characters
#1
Hi All,

Just been reading around the net trying to find out a way of specifying an optional character in the MaskProcessor tool. To be clear I basically want to be able to specify that a character might be a "A" (for example) or might not be there at all.

Any idea how I do this or if it is even possible?

Thanks!
#2
Hey,
maybe you can give some examples? How are you using the output (dict, pipe etc)?

Say you want that the 'A' should be at position 3 or not, but otherwise you want to have only digits a plausible custom charset + mask could be:
-1 ?dA ?d?d?1?d?d?d

another very straight forward approach could be to just run maskprocessor once w/ the A and once w/o and e.g. redirect the output (i.e. 2x -> append) to your dict.

What approach you finally (should) choose depends really on how you use the output and also a little bit on where the optional char should be and if it could be there multiple times etc.

Hopefully this help...
#3
Hi Phil,

Thanks for your response.

So far I have done your suggestion with the multiple runs of MaskProcessor and cat'd them all together. This gets a bit tedious when you have lots of files put to bring together.

This particular example is perhaps something like:

-1 ?s(or not) ?1AA?1AA?1AA

Not actually sure that makes it any clearer but in that example I *think* you would end up having 7 files to cat together.

Thanks!
#4
Could you please try to explain what you whish in output in a list of statements like this (only dumb example):
  • in first position I always want to have *all* special chars
  • in second position I want to have eighter a A or skip the A and have a special char
  • in third position I want to have always a digit [0-9]
  • the output should have a minimum length of 4
  • the output should have a maximum length of 8
  • etc and so on

Maybe this way it is easier for all of us to understand how the output should look like.

Thx for you effort to explain it to me Wink