Allow Specific Characters in a textbox C# [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I need to allow specific characters in my textbox but not range of letters only those ( T, A, G, C ).. the problem is I can't find the regular expression pattern for that.

I think you can make it just with /[TAGC]/g.
I strongly recommend you to check out this site, you can test every regular expression you need there:
RegExr

Related

How to get list of installed input languages (keyboard layouts)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
The questions I saw here is mostly about getting current input layout, but I need list of all installed input layouts.
It's like when we install Windows we choose additional input method for our native language and we usually has 2 of them. And I need to know it.
foreach (InputLanguage c in System.Windows.Forms.InputLanguage.InstalledInputLanguages)
{
Console.WriteLine(c.Culture.EnglishName);
}

Validation Expression - C# [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am trying to create a validation expression for a table name in the format of:
Name_TableName_YYYYMMDD
right now I have something like this:
^[a-zA-Z0-9][^_]+[a-zA-Z0-9][^_]+\d{8}
Number at the end can read 8 digits.
You could try this (very basic) expression
[a-zA-Z]+_[a-zA-Z]+_[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])
Link to a test

C# - Skype user validation (RE) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I saw this post in internet about the restrictions on Skype name
A Skype username cannot be shorter than six characters or longer than
32. It can contain both letters and numbers, but must start with a letter; accented characters are not allowed. The only punctuation
marks you can use are commas, dashes, periods and underscores.
What is the regular expression that restrict these rules in C#?
Regards
maybe you can try this:
/^[A-Za-z\d\,\-\.\_]{6,32}$/
EDIT: make alphabets case-insensetive

How to match a string that doesnt contain a pattern [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am trying to write a regex template that matches all the strings that doesn't contain a certain template.
E.g.:
Matches:
This is my friend. He is very nice.
in
This is my friend. He is very nice.
but doesn't match anything in :
This is my friend John Michaels Fredrickson. He is very nice.
Because it contains something like this: ([A-Z][a-z]+\s?){3}
You can use negative lookahead:
^(?!.*?([A-Z][a-z]+\W){3}).*$
RegEx Demo

How To Compare two strings on Percentage Basis [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to compare two strings on percentage basis
like i have this
Player and wmplayer
Manager and IDMan
Mail and WINMail
Explorer and iexplorer
Any Help Please
You can probably make use of a library such as ScoreSharp. It is designed to do fuzzy matching to find similarities between strings.

Categories