A method, comprising: at an electronic device with a display device : displaying, via the display device, a first set of characters , a second set of characters , and a special character between the first set of characters and the second set of characters; receiving user input corresponding to selection of the first set of characters; and in response to receiving the user input: in accordance with a determination that a set of grouping criteria are met, wherein the set of grouping criteria are based on the first set of characters and the second set of characters, and wherein the set of grouping criteria includes a first criterion that is met when the first set of characters, the second set of characters, and the special character between the first set of characters and the second set of characters, together, represent a predefined group, visually distinguishing the first set of characters and the second set of characters, wherein visually distinguishing the first set of characters and the second set of characters includes displaying a first indicator at a first end of the first set of characters and the second set of characters and a second indicator at a second end of the first set of characters and the second set of characters; and in accordance with a determination that the set of grouping criteria are not met: visually distinguishing the first set of characters; and forgoing visually distinguishing the second set of characters, wherein visually distinguishing the first set of characters and forgoing visually distinguishing the second set of characters includes displaying a first indicator at a first end of the first set of characters and a second indicator at a second end of the first set of characters. at an electronic device with a display device : displaying, via the display device, a first set of characters , a second set of characters , and a special character between the first set of characters and the second set of characters; receiving user input corresponding to selection of the first set of characters; and in response to receiving the user input: in accordance with a determination that a set of grouping criteria are met, wherein the set of grouping criteria are based on the first set of characters and the second set of characters, and wherein the set of grouping criteria includes a first criterion that is met when the first set of characters, the second set of characters, and the special character between the first set of characters and the second set of characters, together, represent a predefined group, visually distinguishing the first set of characters and the second set of characters, wherein visually distinguishing the first set of characters and the second set of characters includes displaying a first indicator at a first end of the first set of characters and the second set of characters and a second indicator at a second end of the first set of characters and the second set of characters; and in accordance with a determination that the set of grouping criteria are not met: visually distinguishing the first set of characters; and forgoing visually distinguishing the second set of characters, wherein visually distinguishing the first set of characters and forgoing visually distinguishing the second set of characters includes displaying a first indicator at a first end of the first set of characters and a second indicator at a second end of the first set of characters. visually distinguishing the first set of characters; and forgoing visually distinguishing the second set of characters, wherein visually distinguishing the first set of characters and forgoing visually distinguishing the second set of characters includes displaying a first indicator at a first end of the first set of characters and a second indicator at a second end of the first set of characters. <EOS>