# Searching for restricted characters

**URL:** <https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868>\
**Category:** Eggplant Functional\
**Tags:** script, sensetalk\
**Created:** [June 28, 2022, 8:51am UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868 "2022-06-28T08:51:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prunice](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/p/b5ac83/32.png) [@Prunice](https://forums.eggplantsoftware.com/u/Prunice)\
**Post date:** [June 28, 2022, 8:51am UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868/1 "2022-06-28T08:51:10Z")

</div>

I had a requirement to search for a ] character but can find nothing in the manual about how to do it. Anyone done this before and can share with me how to do it?

---

<div class="post-metadata">

**Author:** ![LoganC](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/loganc/32/123_2.png) [@LoganC](https://forums.eggplantsoftware.com/u/LoganC)\
**Post date:** [June 28, 2022, 4:54pm UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868/2 "2022-06-28T16:54:39Z")

</div>

Capture an image of the character and use something like this:  
assert that imagefound(image:“MyCharacter”, waitfor:3)

You could also use OCR if you had to, but only do it if you must, like if your character changes.  
assert that imagefound(text:"]",waitfor:3)

Consider adding a search rectangle to your image or text properties as well.

Thirdly, if your app is browser based you can use the built in “find” feature.  
typetext controlkey, “f”  
typetext “]”, returnkey  
assert that imagefound(image:“capture\_of\_search\_result”,waitfor:3)

---

<div class="post-metadata">

**Author:** ![Prunice](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/p/b5ac83/32.png) [@Prunice](https://forums.eggplantsoftware.com/u/Prunice)\
**Post date:** [June 29, 2022, 10:15am UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868/3 "2022-06-29T10:15:36Z")

</div>

Thanks LoganC. I have to use OCR with the SUT I have so I think the third method might just be the way to go! Thanks very much!

---

<div class="post-metadata">

**Author:** ![J\_Grosso](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/j/c57346/32.png) [@J\_Grosso](https://forums.eggplantsoftware.com/u/J_Grosso)\
**Post date:** [June 30, 2022, 11:47pm UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868/4 "2022-06-30T23:47:49Z")

</div>

Not sure if this helps, but text in between quotes is not taken literally and eggplant may try to interpret special characters like the ]. I don’t know if you can escape sequence “]” like you can do “\’” — single quote character; “\” — backslash character.

Text between the double \<\< \>\> it taken literally so using \<\<]\>\> in place of “]” should work.

---

<div class="post-metadata">

**Author:** ![Prunice](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/p/b5ac83/32.png) [@Prunice](https://forums.eggplantsoftware.com/u/Prunice)\
**Post date:** [July 4, 2022, 10:46am UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868/5 "2022-07-04T10:46:39Z")

</div>

Hi J\_Grosso, yes that helps a lot. Many thanks!

---

<div class="post-metadata">

**Author:** ![SenseTalkDoug](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/sensetalkdoug/32/88_2.png) [@SenseTalkDoug](https://forums.eggplantsoftware.com/u/SenseTalkDoug)\
**Post date:** [July 5, 2022, 5:15pm UTC](https://forums.eggplantsoftware.com/t/searching-for-restricted-characters/7868/6 "2022-07-05T17:15:38Z")

</div>

Actually, quoted text in SenseTalk _is literal_. There is no difference between `"]"` and `<<]>>`. Escape sequences only apply when a string is preceded by “@” , like this: `@"Line 1\nLine 2"`.
