0
votes
1answer
34 views

Escaping hash and quote to regular expression

I am trying to define a regular to use with a regular expression validator that limits the content of a textbox to only alphanumeric characters, slash (/), hash (#), left and right parentheses (()), ...
-2
votes
1answer
55 views

Regex to replace string in a filename found in XML

I have a string similar to the following which I am reading from a file into a string: <ns0:PromptPlaybackComponent x:Name="Intromessage" PromptList="&lt;?xml ...
0
votes
5answers
72 views

Should not allow single zero or 0.##

How do I restrict single zero in a numeric (Decimal may alow) textbox? Textbox can accept any number but it should not accept only zero or "0.##" as value. For example: "900.55", "200.00" is valid ...
0
votes
3answers
62 views

Regex to select all commas up to a specific character

I am having a terrible time with regular expressions. Its terrible for me to admit, but I just don't use them enough to be really good when I need to be. Basically due to the way our application runs, ...
4
votes
3answers
50 views

Match price with multiple comma

I want to match values having multiple comma in them. I'm able to match values with only 1 comma. regex: (\$\d+\,\d+) Example Value: $567,76 but i need to match this value $567,76,87 but this regex ...
1
vote
1answer
21 views

Regex Match extraction

I've got some text that follows the format text ( text + numbers | text + numbers | 2-4 digit number text) I'm interested in extracting the 2-4 digit number from this string in C#. My regEx string ...
0
votes
2answers
63 views

Regular expression in C# for paths

I need help in getting a regular expresion for the following: /_layouts/images/ABC.RadToolBarWebPart/add.png And a url which could be complete or relative. Some examples: ...
0
votes
1answer
56 views

How to keep original line and ammended line with Regex

I am learning C# and I would like some help. With the help of the people on I have managed to achieve editing an .inf file section using a regex, but I would like to keep the original line of text ...
-2
votes
2answers
70 views

Find all integers in string C# [closed]

I need to find the sum of all the integers in a string: bl1a:bl3a: blaspecial:1\r\nblab7la\r\n\r\nbla:bla: blaspecial:4\r\nbl9abla\r\n\r\nb4la:bla: blaspecial:2\r\nblabla\r\n\r\n The main rules for ...
2
votes
3answers
70 views

Replacing String Pattern with C# Regular Expression

I want to replace string matching specific pattern using C# regular expression. I did try out various regular expression with Regex.Replace Function but none of them worked for me. Can anyone help me ...
-4
votes
0answers
53 views

Split Boolean expression with regex

I need to split a boolean expression. The boolean expression may contain parenthesis, OR, AND, NEAR, and NOT. For example: (hallo AND (Goodby OR Tanks)) AND (How AND To And (Split OR That)) Should ...
-4
votes
3answers
70 views

Best Regular Expression for Email Validation in C# [duplicate]

I have seen a multitude of regular expressions for different programming languages that all purport to validate email addresses. I have seen many comments saying that the expressions in question do ...
2
votes
5answers
87 views

Remove consecutive <br> from string using regex c#

I have following string regex "choose to still go on the trip. <br><br>\r\nNote that when booking" After converting it with regex I need to replace <br> tags with only one ...
2
votes
2answers
53 views

Regex Get only strings with 3.X

I have strings like : - 3.1 TitleA - 3.1.1 TitleB - 3.1.1.1 TitleC - 3.2 TitleD - 3.2.1 TitleE - 3.2.2 TitleF - 3.3 TitleG I would like to only get titles starting with 3.X I tried to use ...
2
votes
2answers
81 views

Given collection of strings, count number of times each word appears in List<T>

Input 1: List<string>, e.g: "hello", "world", "stack", "overflow". Input 2: List<Foo> (two properties, string a, string b), e.g: Foo 1: a: "Hello there!" b: string.Empty ...

1 2 3 4 5 395
15 30 50 per page