can somebody help me to match following type of strings "BEREŽALINS", "GŽIBOVSKIS" in C# and js , I've tried
\A\w+\z (?>\P{M}\p{M}*)+ ^[-a-zA-Z\p{L}']{2,50}$
, and so on ... but nothing works . Thanks
\P{M}\p{M}*)+ ^[-a-zA-Z\p{L}']" /> \P{M}\p{M}*)+ ^[-a-zA-Z\p{L}']" /> \P{M}\p{M}*)+ ^[-a-zA-Z\p{L}']"/>
can somebody help me to match following type of strings "BEREŽALINS", "GŽIBOVSKIS" in C# and js , I've tried
\A\w+\z (?>\P{M}\p{M}*)+ ^[-a-zA-Z\p{L}']{2,50}$
, and so on ... but nothing works . Thanks
On
Can you give an example of what is should not match?
Reading your question it's like you want to match just string (on seperates line maybe). If thats the case just use
^.*$
In C# this becomes
foundMatch = Regex.IsMatch(SubjectString, "^.*$", RegexOptions.Multiline);
And in javascript this is
if (/^.*$/m.test(subject)) {
// Successful match
} else {
// Match attempt failed
}
Just wrote a little console app to do it:
Works with the two examples you gave me, but not sure about all scenarios :)