Click here to Skip to main content
15,884,041 members
Home / Discussions / C#
   

C#

 
AnswerRe: What is wrong Pin
Andrew Rissing8-Dec-06 7:58
Andrew Rissing8-Dec-06 7:58 
QuestionNHibernate Pin
peshawarcoder8-Dec-06 6:41
peshawarcoder8-Dec-06 6:41 
AnswerRe: NHibernate Pin
Judah Gabriel Himango8-Dec-06 6:54
sponsorJudah Gabriel Himango8-Dec-06 6:54 
QuestionDisplay Datagrid Decimal to 2 places Pin
jeweladdict8-Dec-06 5:47
jeweladdict8-Dec-06 5:47 
AnswerRe: Display Datagrid Decimal to 2 places Pin
ednrgc8-Dec-06 5:58
ednrgc8-Dec-06 5:58 
GeneralRe: Display Datagrid Decimal to 2 places Pin
jeweladdict8-Dec-06 6:49
jeweladdict8-Dec-06 6:49 
GeneralRe: Display Datagrid Decimal to 2 places Pin
ednrgc8-Dec-06 6:59
ednrgc8-Dec-06 6:59 
QuestionNeed help with Regex Pin
zaboboa8-Dec-06 5:08
zaboboa8-Dec-06 5:08 
Hello,

I have the following constants:
<br />
public static string DOCUMENT_NAME_PARSE_EXPRESSION = @"(AG_DOCNAME)(?innerDocName.*?)(AG_DOCNAME)";<br />
public static string DOCUMENT_NAME_INNER_EXPRESSION = @"${innerDocName}";<br />


I have the string that contains something like that:

..some text here .....AG_DOCNAMEtestAG_DOCNAME......some text here...

Now I pass that string into a function:
<br />
private bool ReplaceValueInHTML (string context, string newValue)<br />
{<br />
Regex expression = new Regex(DOCUMENT_NAME_PARSE_EXPRESSION, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled | RegexOptions.ExplicitCapture);<br />
<br />
Match match = expression.Match(context);<br />
if (match.Success)<br />
{<br />
    // WHAT GOES IN HERE               <br />
}<br />
else<br />
{<br />
    return false;<br />
}<br />
return true;<br />
} <br />


What I am trying to do is this: After I find that substring (AG_DOCNAMEtestAG_DOCNAME), I want to replace "test", with the newValue. And after user expression.Replace(context, match), or something like that. Proble is I can't replace that "test" value. Anybody has any ideas?

Thank you.
AnswerRe: Need help with Regex Pin
ednrgc8-Dec-06 7:04
ednrgc8-Dec-06 7:04 
QuestionInsert javascript into IE Address bar Pin
PhrankBooth8-Dec-06 4:39
PhrankBooth8-Dec-06 4:39 
AnswerRe: Insert javascript into IE Address bar Pin
ednrgc8-Dec-06 7:06
ednrgc8-Dec-06 7:06 
QuestionHow to Use Sql Transactions With DataRow ? Pin
hdv2128-Dec-06 4:17
hdv2128-Dec-06 4:17 
AnswerRe: How to Use Sql Transactions With DataRow ? Pin
Colin Angus Mackay8-Dec-06 4:41
Colin Angus Mackay8-Dec-06 4:41 
QuestionNetwork Credentials for domain user Pin
vineas8-Dec-06 4:15
vineas8-Dec-06 4:15 
QuestionTreeview and jump to node Pin
Saamir8-Dec-06 4:13
Saamir8-Dec-06 4:13 
AnswerRe: Treeview and jump to node Pin
Pete O'Hanlon8-Dec-06 5:01
mvePete O'Hanlon8-Dec-06 5:01 
AnswerRe: Treeview and jump to node Pin
Not Active8-Dec-06 5:07
mentorNot Active8-Dec-06 5:07 
QuestionRe: Treeview and jump to node Pin
Saamir8-Dec-06 5:55
Saamir8-Dec-06 5:55 
AnswerRe: Treeview and jump to node Pin
Not Active8-Dec-06 6:05
mentorNot Active8-Dec-06 6:05 
Questionscrapbook - help Pin
sanaziuse8-Dec-06 4:03
sanaziuse8-Dec-06 4:03 
AnswerRe: scrapbook - help Pin
Colin Angus Mackay8-Dec-06 4:36
Colin Angus Mackay8-Dec-06 4:36 
GeneralRe: scrapbook - help Pin
sanaziuse8-Dec-06 4:59
sanaziuse8-Dec-06 4:59 
GeneralRe: scrapbook - help Pin
User 66588-Dec-06 5:55
User 66588-Dec-06 5:55 
GeneralRe: scrapbook - help Pin
sanaziuse8-Dec-06 6:12
sanaziuse8-Dec-06 6:12 
GeneralRe: scrapbook - help Pin
Colin Angus Mackay8-Dec-06 6:40
Colin Angus Mackay8-Dec-06 6:40 

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.