Are you using Subject Area based IDD? And is this a requirement for it?
Yes, after selecting the option of Person in the drop down field of the Subject Area, there is a Query Filter Criteria section with the Available Attributes section on the right.
I don't know if I necessary need to build the query in this area, but if I don't, I need to import the script for others to use.
Is this requirement is only for a search query only? If you are using IDD you might be referring to Advance query and if you are working with e360 applications we do not have the Advance query feature. Please confirm where you want to fit this requirement.
We can not search something based on number of chars length. Any query used in MDM will be converted to a SQL query, if the requirement is feasible in SQL then you can use the same in MDM as well.