|
Set the ExplicitCapture flag when creating the Regex.
|
|
|
|
|
it has "RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture"
interesting point is:
if the text has " or ' it's working correctly
ex 1:
<img src="http://www.takvim.com.tr/i/spacer_trans_1x1.gif" width="10" height="1">
ex 2:
<img src=http://www.takvim.com.tr/i/spacer_trans_1x1.gif width=10 height=1>
ex 1: is working
ex 2: doesn't work
I want to fly but I don't have wings
|
|
|
|
|
I think you grouping might be incorrect. Try do the isolated cases first, then combine them once they are working. Currently you have no idea if it is the regex that is incorrect or the way the grouping has been constructed (it may be that it only allows the define the grouping name once, in that case you need to wrap the grouping around all possible options).
|
|
|
|
|
I tried with "The Regex Coach" program. There is no problem with pattern, it's working for all cases.
It seperates to groups correctly.
I'm confused...
(?<name>\b\w+\b)\s*=\s*("(?<value>[^"]*)"|'(?<value>[^']*)'| (?<value>[^"'<> \s]*) |(?<value>[^"'<> \s]+)\s*)+
may be ?<name> and ?<value> are problem. I don't know...
I want to fly but I don't have wings
|
|
|
|
|
enginço wrote: I tried with "The Regex Coach" program. There is no problem with pattern, it's working for all cases.
Then you probably did something wrong when copying the regex expression to code.
|
|
|
|
|
thanx for your reply,
I found the problem
| (?<value>[^"'<> \s]*) |
is wrong
|(?<value>\w[^"'<> \s]*)|
is correct
But both is OK on The Regex Coach program, in C# it's behave different.
Infact I don't know how is working getting groupCollection.
Anyway, it's solved. Thanx
I want to fly but I don't have wings
modified on Thursday, September 11, 2008 7:48 AM
|
|
|
|
|
Hi all,
I want to send a byte array to a C++ server in C#. Basically I want to know about socket communication in C#. Can someone let me the way to do it, any simple example really appreciate.
Thanks in advance.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You could use a Socket, or use a TcpClient, the latter is rather simple, and MSDN should have a small sample.
|
|
|
|
|
Ya, I use TcpClient as follows.
<br />
try<br />
{<br />
testClient = new TcpClient("192.168.2.75", 5001);<br />
}<br />
catch (SocketException ex)<br />
{<br />
MessageBox.Show(ex.Message, "Socket Error", MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
Now my question is how to send a message though the client. Can you give me a help to do it.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Just call testClient.GetStream() and then you have a Stream to sent and receive on.
|
|
|
|
|
Ya, thanks a lot. I've done it well. Now I'm doing some modifications on it. I get you if I have any questions.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
There is a great tutorial on TCPClient & TCPServer on GeekPedia[^] in the form of a client - server chat app. I actually based the project im working on for work's Client Server architecture on it.
That version is a bit buggy but i think its worth a read.
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi,
I have a magnetic Card reader (Soft & Wireless Timeit) it is connected to the com port of my PC .
I want to read the tag(data) from the card (simillar to Credit Card) using C#.
if any one having the code pls help me
thaks in advance
|
|
|
|
|
Try to use the sample of SerialPort Class from MSDN.
|
|
|
|
|
The manufacturer of the reader will almost certainly be able to supply you with an SDK. Check their website or ask via e-mail
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
string lookFor; // used to store the restaurant name we are looking for
BOOL bFound;
//Take the 1st element in the linked list
while ( ! ListEmpty(l) )
{
lookFor = l->elem->restaurant; // Storing r. name for the current list element...
bFound = FALSE;
tmp = q->front; // Get the first element in the queue
while( ( ! QueueEmpty(q) ) && ( ! bFound ) )
{
cout << tmp->item << tmp->cuisine << tmp->mode << endl;
if ( ! strcmp(tmp->restaurant, lookFor) )
{
bFound = TRUE; // found what we were looking for!
}
else
tmp = tmp->next; // still not found, search further in the queue
}
if ( bFound ) // It was found
{
//Do what you please with the info in *tmp*
//it is the coresponding to the current list item
}
|
|
|
|
|
You keep asking the same thing, and at least 2 of us have asked for further clarification a couple of threads down from your original posts. I suggest that you re-read these comments carefully, and rephrase your question to address the points people have raised.
|
|
|
|
|
if you have a look at this link:
http://www.projectrosetta.com/ftsl/xamlanimations.aspx
and the click on the second image (Belnd screen)
you will get a nice and clean Ajax popup..
how can I have the same on Windows Form with the same back effect applies to the parent window?
|
|
|
|
|
Ask in the correct forum.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
what correct forum?
i want this on windows application NOT asp
|
|
|
|
|
Who could possibly determine what you want based on what you posted?
Try googling "C# windows form animation", and see what you come up with.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi.
i'm trying to debug some problem on a code which i didnt wrote.
what happends is that when i execute a c# based process (lets call him mfProcess), one of my log file is locked by it (lets call him mfLog.log)
the file is unlocked before i execute mfProcess.
by debugging ,i stoped at the first line of code of mfProcess, but the file has been already locked, which means something happends from the time i run the exection command (the file is free) and the first line of the mfProcess code(the file is locked.
have any ideas?
Thanks.
|
|
|
|
|
Dll initalization problem is the only thing i can think of but i would happy to hear another idaes .
Thanks.
|
|
|
|
|
Is it a .Net DLL?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
yes, those are .net dlls.
|
|
|
|