Need Some Suggestion For A Regex [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Hi guys I Need Some Help With A Regex:
I Need A Regex:
1. that accepts all type of characters like ą or Э or Ǿ or Я ...
2. which the number of characters is between 3 and 15
3. doesn't contain special characters

I'm guessing you want to match 3 to 15 Unicode letters. For that, you can use
new Regex(#"^\p{L}{3,15}$")
If you also want to allow spaces, you can use a character class:
new Regex(#"^[\p{L} ]{3,15}$")

Related

Regex for path and alpha numeric character [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I need regex to validate path like
/addd/dddd
aaaa/bbbb/
a1233/dddd
but not
#ddd/aaaa
or any other symbol,how should I do that?
Try with this one(considering only aaa can not be a path, if so, add it with pipe):
^((?:/[a-zA-Z0-9]+)+/?|/?(?:[a-zA-Z0-9]+/)+)[a-zA-Z0-9]*$
(?:/[a-zA-Z0-9]+)+/? is matching paths like aa/aa/ and /?(?:[a-zA-Z0-9]+/)+ is matching directories like /aa/aa. And [a-zA-Z0-9]* is checking for additional names when the directory format is aa/aa.
Try this regex at online

Remove/replace hindi font in C# regex [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
" ** दुनिया की सबसे बेस्ट कंपनी * the zzzz is best company in world "
I have remove/replace Hindi Font in String in mvc c# with regex .
plz Help Me . .
Try:
\p{IsDevanagari}
See it working here (characters are replaced with X).

Alphanumeric regex expression in c# [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am new in the programming and i am looking for a regular expression as
first three characters should be alphanumeric followed by a constant which is a special character and then 1 or more hashes
(3 alphanumeric) (constant) ( one or more hashes)
AB1-#
ABC$##
etc
you can use something like
(\w{3})([^\s])(#+)

Difference between regular expressions for finding a word? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I just came across these 2 regular expressions while looking for parsing a sentence for words.
RegEx1: Used to split the words
[^a-zA-Z]
RegEx2: From the previous splitted words, find words with this pattern.
[a-zA-Z]
My question is what is both these regex looking for? An occurance of a word, ignore special character..?
One good tool when dealing with regular expressions are online tools like
http://regexhero.net/tester/
There can be slight differences between tools and your environment so fair warning.
If you use the tool you can see how [^a-zA-Z] matches non letters, while [a-zA-Z] matches letters.

How can I get the string between two tags [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I wonder how to get a string (or array of strings) between two known tags.
For example I have this string
string var1="my first video is [video]http://video.com/aaa[/video] and my second is[video id=\"1\" length=\"3\"]http://video.com/bbb[/video]";
How to get these values http://video.com/aaa and http://video.com/bbb?
use this pattern: #"\[video.*?\](.*?)\[/video\]" and then get group 1. I won't post the whole code because I dont want to do your work for you. Read about C# Regexes, Patterns and try to write your code with this pattern.

Categories