Searching for symbols and emojis
This topic describes how to make symbols searchable in a dtSearch index and how to use regular expressions to search for certain symbols reserved as search operators, such as the % sign. There are two ways to make a character searchable, depending on whether the hexadecimal character code is less than 007F or greater than 0080.
Searching for symbols
To search for symbols, perform the following steps:
- Create a dtSearch index.
- Update the alphabet file to include the % sign as an indexed character:
- Enter the following under [Letters] // Original letter, lower case, upper case, unaccented:
[Space] [%] [Space] [%] [Space] [%] [Space] [%]Note: You must have a leading space. You cannot have a trailing space. - Delete the % sign from the [Ignore] section. Take care not to remove the gray boxes, which represent non-printable characters. Removing them may break the index.
Before: - Repeat these steps for any other symbols that you need to make indexed. Delete the appropriate symbols from the [Spaces], [Ignore], or [Hyphens] sections. Please note, if you edit the hyphen, space, or ignore section, you will need to also keep the leading space. Removal of leading spaces will cause errors in Relativity.
- Enter the following under [Letters] // Original letter, lower case, upper case, unaccented:
- Perform a full build of the dtSearch index.
You can search for terms containing the % sign using a regular expression. For example, if you need to search for documents that contain the term 75%, you would enter the following in your search box, ensuring you select the proper dtSearch index:
"##75\u0025"
To break this regular expression down:
- ## signals to Relativity to treat the string as a regular expression.
- \u indicates a search using a character's Unicode value, to follow in the next four characters. Note: Remove the "\u" before the four character value in the Unicode Entity field when adding to your Alphabet file.
- 0025 indicates the hexadecimal Unicode value for the % sign.
Note: For most symbols, once you have indexed the character in the alphabet file, you can type them directly into the dtSearch box without using regular expressions. For example, to search for 30!, enter 30! into the dtSearch box after you have made ! an indexed character. You only need to use RegEx for certain symbols.
Another example would be searching for documents that contain the term 75 %, you would enter the following in your search box, ensuring you select the proper dtSearch index.
"##75" w/1 "##\u0025"
- ## signals to Relativity to treat the string as a regular expression.
- w/1 indicates that the number be within the % sign.
- \u indicates a search using a character's Unicode value, to follow in the next four characters.
- 0025 indicates the hexadecimal Unicode value for the % sign.
For characters outside of the ASCII code range, characters greater than 0080 such as § and £, you cannot make them searchable by adding them to the letters section. Instead, create an AdditionalLetters section at the bottom of the alphabet file and insert the characters' Unicode value.
For example: AdditionalLetters = 20AC 00A3 00A5
This would make the Euro symbol, British Pound, and Japanese Yen searchable.
Note: Be sure to remove the "\u" before the four character value in the Unicode Entity field when adding to your Alphabet file.
Searching for emojis
Relativity supports searching for emojis with dtSearch indexes.
Note the following about emojis:
- Emoji search works with file formats that store emojis as Unicode characters, such as Word documents and emails.
- File formats that store emojis in other formats, such as storing the emoji name, are currently not supported.
- Some examples include messages from Slack and Teams.
- Relativity automatically includes emojis in search indexes. You do not need to perform any additional Alphabet file configurations to search for emojis.
To run emoji searches:
- Enter an emoji in the search box. Note: You can copy, then paste an existing emoji, or use the appropriate shortcut keys for your operating system. For example, in Windows, click the Windows Key + period (.) to open the emoji sampler.
- Click Enter.
Your search results appear in the document list.
Symbol searching quick reference
Use the following table to quickly reference how to search for special characters. Note that you can search for the ampersand symbol without using RegEx.
Symbols | Directions | Example search term | Example search string |
---|---|---|---|
$ & @ \ / + , . ; - ' ` ! < > { } ^ _ [ ] | | Update the alphabet file and search. |
|
|
? * ( ) # = | Update the alphabet file and use RegEx with an escape character (\). |
|
|
" % : ~ |
Update the alphabet file and use RegEx with the hexadecimal Unicode value. |
|
|
Characters outside the ASCII code range such as § and £ | Create an AdditionalLetters section at the bottom of the alphabet file and insert the character's Unicode value. |
|
|
Common characters
Here is a list of Unicode hex values necessary to make some commonly requested characters searchable:
Hex value | Symbol | Description |
---|---|---|
00A3 | £ | British Pound |
00A5 | ¥ | Yen half-width |
FFE5 | ¥ | Yen full-width |
00A7 | § | Section |
00A9 | © | Copyright |
00AE | ® | Registered Trademark |
00B6 | ¶ | Paragraph |
20AC | € | Euro |
For additional Unicode values, use the following Unicode converter: https://www.unicode.org/charts/