1
vote
3answers
46 views

Regex to HTML replace attributes

I have a string that looks like so: <p class="thumbnail"><img src="/media/2905/260x150.gif" alt="260x150" width="260" height="150" rel="260,150" /></p> ...
-5
votes
2answers
41 views

How to get script type,owner anme and object name from the string provided? [closed]

I can have PROCEDURE dbo._ws_CallLogs_DeleteAll OR TABLE [dbo].[CachedPlan] OR VIEW [test].[MyView] OR FUNCTION [xyz].[ParseStringList] as input The output should be For Case 1 string ...
-4
votes
1answer
26 views

regex to find ip address after key words [closed]

C#: I have a string that contains an entire website in it and I need to get an IP address from it. There are multiple IP address's in this string. I need a certain one that comes after "D H P" ...
1
vote
5answers
65 views

Splitting a string seems not to work

I have problems with reading a file (textasset) line by line and getting the results! Here is the file I am trying to read: AUTHOR COMMENT INFO 1 X ARG 0001 0.581 2.180 1.470 ...
0
votes
3answers
57 views

.NET Regex: Is {0} quantifier works?

In LINQPad (.NET ) all these expressions returns "True": new Regex(@"\w{0}").IsMatch("aa aa ZZ Z").Dump(); new Regex(@"(\w){0}").IsMatch("aa aa ZZ Z").Dump(); new Regex(@"[\w]{0}").IsMatch("aa aa ZZ ...
0
votes
2answers
63 views

Combine nested span tags

Can anyone assist me with trying to combine nested span tags? I have some generated HTML that I trying to tidy up, and I'm having trouble getting this bit working. Example HTML: <p> ...
2
votes
1answer
47 views

UK Postcode Regex [duplicate]

I'm looking to be able to validate UK Postcodes, and ideally, I would like the following cases to pass: W1 W12 WC1 WC1A WC12 W1 6BT W12 6BT WC1 6BT WC1A 6BT WC12 6BT W16BT W126BT WC16BT WC1A6BT ...
6
votes
2answers
42 views

Regex MatchCollection gets too many results

Using C# and Regex I have a strange situation: string substr = "9074552545,9075420530,9075662235,9075662236,9075952311,9076246645"; MatchCollection collection = Regex.Matches(substr, @"[\d]*"); In ...
-2
votes
0answers
55 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
17 views

Use Regex.Replace to format TimeSpan Components

I'm using .net 3.5 and I would like to find out if there is a way to use Regex.Replace to format TimeSpan components for user provided formats. Ideally the user could send several types of desired ...
1
vote
2answers
61 views

Find all 'more or less than' characters which is not tags in xml

I need a regex to find all '<' or '>' which is not xml-tags. Example: <tag1>W<E><E</tag1>Z<>S Should find <><<> Example: ...
8
votes
2answers
130 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 ...
4
votes
1answer
36 views

Best way to process non-standard quotes in XML parser [duplicate]

I am creating a program that process text with XML formatting. I found that when the tag values are non-ASCII quotes (double quotes / ASCII 34, single quote / ASCII 39) the parsing throws exception. ...
4
votes
7answers
2k views

Regex accent insensitive?

I need a Regex in a C# program. I've to capture a name of a file with a specific structure. I used the \w char class, but the problem is that this class doesn't match any accented char. Then how ...
-5
votes
2answers
53 views

Multiline Regular Expression (Regex) with C# [closed]

I've been trying to do this for some time, this is a part of text, and I want to get some values from it, to be exact: <td align="Left"> <a href="randomUrl">Something</a> //Need ...

1 2 3 4 5 414
15 30 50 per page