R
R
ReWire_922018-09-09 14:26:21
Regular Expressions
ReWire_92, 2018-09-09 14:26:21

A simple regular expression to find plural endings in a string?

Good afternoon! Please help me with a regular expression to find the presence of plural endings in the search string. I myself do not often encounter regular seasons, so I do not master them in skill. A quick google didn't turn up any results either. Here is the code:

Match suffix = Regex.Match(inputText.text,"[АЯ,ЫЕ,ЫЙ,ЬЯ]");
        if(suffix.Success){
          Debug.Log("множественное окончание:" + suffix.Value);
        }

The result returns matches if at least one of the available letters is present in the string. How to make it work not on individual char, but on their combination?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-09-09
@ReWire_92

/(\S+(?:ая|ые|ый|ья))(?:\s|$)/i

I
IceJOKER, 2015-03-16
@IceJOKER

RewriteEngine on
RewriteCond %{QUERY_STRING} ^uid.*?ru$ [NC]
RewriteRule ^icq\/validate\.html$ /index.php?

^^^
something like this, you can add a regular expression, I was too lazy to fully describe.
htaccess.madewithlove.be is a very useful resource

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question