When performing a GAS search what special characters are removed?

Can you provide the list of the special characters that are removed when performing a search?

When performing a Global Attribute Search (GAS), any character that is not a letter or number in the search string is considered search term separator. To test your search string and see which characters will be omitted, try this regex.

Note that this is different to a string attribute Starts With search, which will include the special characters in the string as part of the match criteria.

1 Like

If you are searching on the right panel you have access to more search options, if you are using a picker you will be using GAS based searching.

It’s important to remember the rules differ for GAS based searches depending on the attribute it is searching.

Excerpt taken from: Search

There are three types of search term types:

  • Alphanumeric - The search term entered must be at least three or more alphanumeric characters before Alloy will perform the search within all searchable attributes. Alloy returns items with any searchable attributes that contain the term as either the first part or all of the attribute.

  • Numeric - If three or more characters are entered, and they are all numeric, for example 32356 , then the search returns any items where the whole number occurs in an attribute. The culture setting for each customer allows for users to search for number attribute values using their native notation in terms of decimal and thousands separators. For example, German customers can search for comma separated decimal numbers using 3,45 that matches the same attribute value as 3.45 if searched for by a customer on a UK project.

  • Date and time - There are four types of Date and time searches that Alloy can perform:

    • Dates - This allows you to search for an item containing a specific date using the format DD/MM/YYYY or MM/DD/YYYY where appropriate. Alloy searches for all items containing a date attribute and also takes into account customer culture information, for example 10/01/2021 will be understood as 10th January 2021 in the day first cultures, while in the month first cultures like America this search string would be interpreted as 1st October 2021.
    • DateTime - This allows you to search for an item containing a specific date and time using the format DD/MM/YYYY hh:mm or MM/DD/YYYY hh:mm depending on the users culture as above. All DateTime values in Alloy are stored in UTC, the entered DateTime search term should be entered in a local customer time zone, for example, New Zealand customers may search for items with a DateTime attribute value 22/01/2021 9:00 which would internally search for the UTC equivalent 21/01/2021 20:00.
    • Time - This allows you to search for an item containing a specific time using the format hh:mm . You can search for hour and minute values, for example, 12:40 to more specific one as 12:40:15.876. You can also search on AM/PM time string, for example, 4 PM or 3:15pm, the dot separator is not supported, for example, 3.15pm is not a valid time format.
    • Seasonal - This allows you to search for an item containing a specific seasonal date using the format DD/MM or MM/DD where appropriate. Alloy searches for all items containing a seasonal date attribute and also takes into account customer culture information, for example 10/01 will be understood as 10th January in the day first cultures, while in the month first cultures like America this search string would be interpreted as 1st October.
1 Like

Regex is almost right here, it should also drop strings of less than 3 chars e.g. /([^\w]|\b\w{1,2}\b)/gm