Great Tutorial on LDAP filters, http://www.selfadsi.org/ldap-filter.htm
What the Article says
The characters ( ) & | = ! > < ~ * / \ play a special role for the declaration of LDAP filters.
If you search for or want to compare these characters within an attribute string, you’ll have to use a prefixed backslash and the corresponding hexadecimal ASCII code:
+ = \2B
( = \28
& = \26
| = \7c
= is \3d
> = \3e
< = \3c
~ = \7e
* = \2a
/ = \2f
\ = \5c
We proved that displayName based filtering is possible. Placement of the parenthesis is important.
An example: We want to retrieve all objects whose attributes "displayName" start with "+" :
Note: The character zero (0) may also be required occasionally.
This is SharePoint 2007 OO Box query for user profile query - (&(objectCategory=person)(objectClass=top)(objectClass=person)( !(userAccountControl:1.2.840.1135126.96.36.1993:=2)))
Now add this to eliminate names that start with + (!(displayName=\2B*)))
Final query to try in SharePoint User Profile custom source
You could also filter by email (mail=*nwi.local)
Run the import again and now the account with display name starting with "+" is now in the "Profiles Missing from Import" view of the user profile store.
Second Example: eliminates any accounts with T or t.
Try adding this to eliminate names beginning with t - (!(displayName=\54*))
where \54 = t and the ! is negation (to not include) and * is wild card. (ascii hex code for T is 54 and for t is 74)
Ran a full import and in my test accounts starting with displayName of either T or t were all placed into the ‘Profiles Missing from Import view’ in the user profile store.