Tagged Questions
2
votes
2answers
48 views
RegEx: Split string by separator and then by another
There is a problem with needed behavior.
Assume there is a
sourceString = @"name1$$value1^name2$$value2^name3$$value3";
maybe more long string...
I'd like to first split by ^ separator and then ...
0
votes
1answer
17 views
Checking Yacc-Syntax using Regualar Expression / C#
I am working on developing a Parser , I would like to check Yacc Syntax using Regular Expression.
But It seems that it doesn't work out
// Yacc-like grammar specifications
// Ligne ::= ...
4
votes
3answers
135 views
“vertical” regex matching in an ASCII “image”
Note: This is a question about possibilities of modern regex flavors. It's not about the best way to solve this using other methods. It's inspired by an earlier question, but that one is not ...
-2
votes
0answers
59 views
Regex Validation in Textbox [closed]
I need to validate certain regular expression depending upon text of textbox and change foreground of text accordingly.
Is there any solution for this one. I'm new to wpf and dont know much about ...
0
votes
1answer
46 views
Validate a string's format like a phone number?
I'm a newbie in C#..I'm writing a console application that accepts data,
I want to validate the data such that it must be entered in a particular format
e.g Phone number must be entered in format ' ...
8
votes
2answers
146 views
What are regular expression Balancing Groups?
I was just reading a question about how to get data inside double curly braces (this question), and then someone brought up balancing groups. I'm still not quite sure what they are and how to use ...
3
votes
1answer
54 views
Regex find token value in .NET
I need some help from someone that is better in Regex than I am :)
I am trying to find the values of specific tokens in a string using .NET (C#)
The string I have has tokens like this one ...
2
votes
4answers
33 views
Regex: find whole pattern, replace partially
I have to find strings like:
"^some_text/some_number$"
for example:
"thetext/34526435"
and if some_text is "generic" then take the number after slash, replacing "generic" to an empty string, ...
4
votes
1answer
38 views
EmailAddressAttribute validation rules
I have been using the EmailAddressAttribute (from System.ComponentModel.DataAnnotations) in my code and it has been working great. The BA's and Testers need to know the rules about how it validates ...
0
votes
1answer
38 views
Regex Matches only getting count 1 instead of 2
This is my Regex:
private static Regex _errorRegex = new Regex(" <div class=\"styleRed\">(?<message>.*?)</div>", RegexOptions.IgnoreCase | RegexOptions.Singleline | ...
0
votes
2answers
27 views
Regex named group empty
This is my program:
class Program
{
private static Regex _regex = new Regex("<span id='TotalG'>$ (?<amount>.*?)</span>", RegexOptions.IgnoreCase | ...
0
votes
4answers
58 views
Regex to parse a simple odata query
I'm trying to create a regex to parse the following 2 strings
Country eq 'United States' and Value eq 1234.45M and CreatedOn eq '2013-06-05T06:04:23.2111146Z'
Value eq 1234.45M and Status eq 'Active' ...
2
votes
3answers
67 views
Regex that matches numbers, letters and dash but not the word net or NET
So far I have
^[0-9a-zA-Z-]+$
and it works great matching numbers, letters and dashes but now I want to exclude the word net in both upper and lower case.
More specifically,
Match:
net123
...
5
votes
5answers
70 views
Regex if all words contains particular symbols [duplicate]
I have a string of emails "[email protected]; [email protected]; [email protected]"
how to write simple regex to check if all words contains [@.] at least once in the word?
1
vote
1answer
39 views
Extract x{} from some text using REGEX
I need to clean some portion text like:
"P{ MARGIN: 0px } Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression."
"BODY{ MARGIN: 0px } Le ...