# Regular expressions

**URL:** <https://forum.xbench.net/t/regular-expressions/889>\
**Category:** Technical Support\
**Created:** [May 9, 2022, 10:19am UTC](https://forum.xbench.net/t/regular-expressions/889 "2022-05-09T10:19:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nari](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@nari](https://forum.xbench.net/u/nari)\
**Post date:** [May 9, 2022, 10:19am UTC](https://forum.xbench.net/t/regular-expressions/889/1 "2022-05-09T10:19:55Z")

</div>

Hi!  
As you can see from the picture, if the source has “O (OFF)”, the target also must have “O (OFF)” too. What regex can I use to detect when the target is wrong for the following case?  
Not detected with default settings.

 ![Test1](https://canada1.discourse-cdn.com/flex035/uploads/xbench/original/1X/2d2427e41f216d7eeb59565e1a0fff0ba44c9a5c.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![omartin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/omartin/32/82_2.png) [@omartin](https://forum.xbench.net/u/omartin)\
**Post date:** [May 9, 2022, 11:02am UTC](https://forum.xbench.net/t/regular-expressions/889/2 "2022-05-09T11:02:47Z")

</div>

Hi,

In this case, you do not need regex. The following powersearch should detect all cases:  
Source term: `"O (OFF)"`  
Target term: `-"O (OFF)"`  
Search mode: Simple  
PowerSearch: On (Ctrl+P if you run the search at the Search tab)

---

<div class="post-metadata">

**Author:** ![nari](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@nari](https://forum.xbench.net/u/nari)\
**Post date:** [May 9, 2022, 1:30pm UTC](https://forum.xbench.net/t/regular-expressions/889/3 "2022-05-09T13:30:09Z")

</div>

Thank you, Omartin!

However, there is another case:  
Turn the dial to “I (ON)” position.

What I want to know is how to detect “Upper Case Mismatch of one letter” like A, B, C and so on.  
Is there any regex for this case?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![omartin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/omartin/32/82_2.png) [@omartin](https://forum.xbench.net/u/omartin)\
**Post date:** [May 9, 2022, 1:50pm UTC](https://forum.xbench.net/t/regular-expressions/889/4 "2022-05-09T13:50:29Z")

</div>

> [@nari](#):
>
> What I want to know is how to detect “Upper Case Mismatch of one letter” like A, B, C and so on.  
> Is there any regex for this case?

Source term: `"(<[A-Z]> \(ON\))=1"`  
Target Term: `-@1`  
Case Sensitive checkbox: On  
Search mode: Regular Expressions  
PowerSearch: On.

---

<div class="post-metadata">

**Author:** ![nari](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@nari](https://forum.xbench.net/u/nari)\
**Post date:** [May 10, 2022, 4:04am UTC](https://forum.xbench.net/t/regular-expressions/889/5 "2022-05-10T04:04:16Z")

</div>

Thank you so much, Omartin! It worked!! 👌
