<p>Try find the regex string in <a href="https://regex101.com/" rel="nofollow noreferrer">https://regex101.com/</a> where you can define your pos and neg examples.</p>

<p>.*(?:(?!ru).).$ </p>

<p>See <a href="https://stackoverflow.com/questions/16398471/regex-for-string-not-ending-with-given-suffix">https://stackoverflow.com/questions/16398471/regex-for-string-not-ending-with-given-suffix</a></p>

CC BY-SA 4.0
2018-09-27T20:09:31.360Z
Thanks for responding, but it doesn't work
user8844
CC BY-SA 4.0
2018-09-28T22:07:07.857Z
My code is pure regex code, it should probably be converted to php. Try add delimiters  /.*(?:(?!ru).).$/mu
lenka
CC BY-SA 4.0
2018-09-29T11:12:06.787Z
Yes, the problem is probably with the plugin that I am trying to use, I dont know what the format should be, or how it is supposed to work, and there doesn't appear to be any documentation
user8844
CC BY-SA 4.0
2018-09-26T21:01:36.460Z
2018-09-26T21:01:36.460Z
lenka
<p>What is the correct Validation Pattern format to add to a Formerly email field in the Craft admin control panel if I want to stop any submissions from email addresses with a .ru TLD?</p>

<p>I've tried:</p>

<pre><code>!(\.ru)
/^((?!\.ru).)*$/s
</code></pre>

<p>But they do nothing.</p>

<plugins-formerly>
Formerly email validation
# Formerly email validation

(Asked by: username_0 on 2018-09-26)

What is the correct Validation Pattern format to add to a Formerly email field in the Craft admin control panel if I want to stop any submissions from email addresses with a .ru TLD?
I've tried:
!(\.ru)
/^((?!\.ru).)*$/s

But they do nothing.

**Tags:** plugins-formerly

---

## 1 answers

### Answer by username_1 on 2018-09-26. Score: 1

Try find the regex string in <https://regex101.com/> where you can define your pos and neg examples.

.\*(?:(?!ru).).$

See <https://stackoverflow.com/questions/16398471/regex-for-string-not-ending-with-given-suffix>

> **Comments:**
> **username_0**: Thanks for responding, but it doesn't work  
> **username_1**: My code is pure regex code, it should probably be converted to php. Try add delimiters  /.*(?:(?!ru).).$/mu  
> **username_0**: Yes, the problem is probably with the plugin that I am trying to use, I dont know what the format should be, or how it is supposed to work, and there doesn't appear to be any documentation  

---

