Click here to Skip to main content
15,893,401 members
Home / Discussions / C#
   

C#

 
GeneralRe: Treeview Problem Pin
Avadhesh Kumar Maurya20-Jul-07 20:00
Avadhesh Kumar Maurya20-Jul-07 20:00 
GeneralRe: Treeview Problem Pin
max2929720-Jul-07 20:05
max2929720-Jul-07 20:05 
Questioni want a asp starter kit Pin
EEmaan20-Jul-07 18:32
EEmaan20-Jul-07 18:32 
AnswerRe: i want a asp starter kit Pin
Christian Graus20-Jul-07 20:18
protectorChristian Graus20-Jul-07 20:18 
QuestionHow to define a regular expression? Pin
mangrovecm20-Jul-07 17:14
mangrovecm20-Jul-07 17:14 
AnswerRe: How to define a regular expression? Pin
Christian Graus20-Jul-07 18:17
protectorChristian Graus20-Jul-07 18:17 
GeneralRe: How to define a regular expression? Pin
mangrovecm20-Jul-07 18:38
mangrovecm20-Jul-07 18:38 
GeneralRe: How to define a regular expression? Pin
mangrovecm20-Jul-07 19:07
mangrovecm20-Jul-07 19:07 
Hi Christian,
I fixed:

Change the string exp = "<a href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))" to
string exp = "<a href\\s*=(\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+)))";

and the result is "index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823"

Source code:

string exp = "<a href\\s*=(\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+)))";

// Create an instance of StreamReader to read from a file.
// The using statement also closes the StreamReader.
string line = "";

using (StreamReader sr = new StreamReader("temp.txt"))
{
line = sr.ReadToEnd();
sr.Close();
}

Regex regx = new Regex(exp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
Match m = regx.Match(line);
while (m.Success)
{
string t = m.Groups[1].Value;

m = m.NextMatch();
}


(-,-)

vtkiet05
QuestionChange the appearance of the form Pin
max2929720-Jul-07 14:21
max2929720-Jul-07 14:21 
AnswerRe: Change the appearance of the form Pin
Christian Graus20-Jul-07 18:31
protectorChristian Graus20-Jul-07 18:31 
GeneralRe: Change the appearance of the form Pin
max2929720-Jul-07 20:03
max2929720-Jul-07 20:03 
GeneralRe: Change the appearance of the form Pin
Christian Graus20-Jul-07 20:21
protectorChristian Graus20-Jul-07 20:21 
GeneralRe: Change the appearance of the form Pin
mav.northwind21-Jul-07 7:54
mav.northwind21-Jul-07 7:54 
GeneralRe: Change the appearance of the form Pin
max2929721-Jul-07 16:33
max2929721-Jul-07 16:33 
GeneralRe: Change the appearance of the form Pin
mav.northwind21-Jul-07 21:09
mav.northwind21-Jul-07 21:09 
GeneralRe: Change the appearance of the form Pin
max2929722-Jul-07 10:15
max2929722-Jul-07 10:15 
Question[STAThread] Pin
max2929720-Jul-07 14:20
max2929720-Jul-07 14:20 
AnswerRe: [STAThread] Pin
Luc Pattyn20-Jul-07 17:42
sitebuilderLuc Pattyn20-Jul-07 17:42 
QuestionFinding a Point on a Circle Pin
max2929720-Jul-07 14:11
max2929720-Jul-07 14:11 
AnswerRe: Finding a Point on a Circle Pin
Christian Graus20-Jul-07 20:38
protectorChristian Graus20-Jul-07 20:38 
AnswerRe: Finding a Point on a Circle Pin
blackjack215021-Jul-07 2:39
blackjack215021-Jul-07 2:39 
GeneralRe: Finding a Point on a Circle Pin
mav.northwind22-Jul-07 5:19
mav.northwind22-Jul-07 5:19 
QuestionImages, Email, Streams Pin
Will Code for Food20-Jul-07 10:32
Will Code for Food20-Jul-07 10:32 
AnswerRe: Images, Email, Streams Pin
Guffa20-Jul-07 14:01
Guffa20-Jul-07 14:01 
QuestionC# on mobile devices Pin
Gareth H20-Jul-07 10:23
Gareth H20-Jul-07 10:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.