|
You may be trying to do too much at once. I'd either make it multiple pass or use code.
One other thing I'll mention, is that often with this sort of thing you need to scan right-to-left.
|
|
|
|
|
|
Hmm... apparently, what I'm seeing is "expected" behavior. Standard regex behavior is to only keep the last group. I think that's insane and apparently so did the .Net folks as they have the only regex engine which keeps all capture groups. Thanks!
|
|
|
|
|
SledgeHammer01 wrote: only keep the last group
When looking at another Regex question today, Regular Expression, specific seq[^] , I learned something new.
A pattern like (aB)* may match multiple times and only the final match will be captured, but you can capture the whole thing too ((aB)*) .
|
|
|
|
|
The .Net regex engine is "special" as it's the only regex engine in the known universe that doesn't throw away intermediate captures. If you look at the Group object that captured the last occurrence of the group in question, there is a Captures property. They give you the intermediate captures in that collection.
(aB)* will match aBaB, but it will only give you 1 aB. If you look in the Captures property, it'll give you the 2 you are after.
((aB)*) will match aBaB, but it will still only give you 1 aB. It will also give you aBaB which is not what you really want.
|
|
|
|
|
SledgeHammer01 wrote: not what you really want
It might be, but I haven't had a need for it yet. :shrug:
|
|
|
|
|
from this job we can get the submitter, and machine, no. of pages and filename. But unable to get the printer for the job(Not Default printer in the machine), No. of copies, paper size and other settings. Need help for this issue.
Thanks in advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
my job is print monitoring i.e. application print manager developing in c#. I catch the print job from printer queue. From that job I can get the print submitter,job name,hosted server,job time, no. of fro print and file name and some other details. but unable to get the printer selected for the print and no of pages,printer paper source, duplex or non duplex and some other details. this my problem.
foreach (var job in LocalPrintServer.GetDefaultPrintQueue().GetPrintJobInfoCollection())
{
UpdateText("Job Name : " + job.JobName.ToString());
UpdateText("Submitter :" + job.Submitter.ToString() + job.TimeJobSubmitted.ToString());
UpdateText("Hosted Server :" + job.HostingPrintServer.Name.ToString());
UpdateText("No of Pages :" + job.NumberOfPages.ToString());
}
I Need help.
please suggest any other way to complete my task.
Thanks in advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
Hi all! Im having a problem with datagridview. A MySQL Query, with int32 column my datagridview show as System.Byte[].
Any suggestion?
Thanks!!
|
|
|
|
|
gonzaloleon wrote: with int32 column my datagridview
Is it an Int32 in the table-definition? Or did you mean an Int32-column in the DGV?
What does your query look like? Can you run a "SHOW CREATE TABLE" query on the table and dump the result here?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I'm uncertain what you mean by your question.
Are you saying it is displaying as byte[] and you don't want it to?
Or you want it to display as byte[] and it isn't?
|
|
|
|
|
It's a problem with MySQL Server Version, i upgrade to 5.6 and there's no more problems.
Thanks All!
|
|
|
|
|
I wanted to know wether I could use your Simple Instant Messenger in a windows app and if yes how do I??
|
|
|
|
|
Is this from an article? If it is, you should really post this request on the article itself. The chances of the author happening on by this post and seeing your question is very small.
|
|
|
|
|
Thank you for the sugesstion.I am very new to this .Once again thank u.
|
|
|
|
|
I find the Import and Export examples in SQL Excel Files with C#2005, share with me.
|
|
|
|
|
Did you try typing that into Google first? It's amazing what you'll find by using a search engine.
|
|
|
|
|
Steady on there!
That's pretty damn close to the OP actually doing some work for himself!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
What was I thinking!
|
|
|
|
|
there are many examples on network but only one code short, I did not test much error, have code read i don't understand to do something, I look for good running, the code has been optimized and short, read perspicuous
|
|
|
|
|
If you're looking for the perfect code to copy and paste into our own app, you've come to the wrong place.
We'll help you with YOUR code the YOU write. Nobody is going to hunt down the perfect piece of code for you.
|
|
|
|
|
nothing is hunting download my code because I want to share them with people like me that is the case, you can see my code fails: "Not a legal OleAut date" when importing excel2007 into SQL Server 2005
|
|
|
|
|
Member 2458467 wrote: nothing is hunting download my code because I want to share them with people like me that is the case
That made no sense at all. I have no idea what you're trying to say.
|
|
|
|
|
I am be an error importing the Excel2007: "Not a legal OleAut date", you see my code below:
public static void ImportToSql(string excelfilepath)
{
string ssqltable = "TABHD";
string myexceldataquery = "SELECT * FROM [dbo_TABHD]";
try
{
string sexcelconnectionstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" + excelfilepath + "; Extended Properties=\"Excel 12.0; HDR=Yes; IMEX=2\"";
string ssqlconnectionstring = @"server = itfriend;Database=HD;integrated security = true";
string sclearsql = "delete " + ssqltable;
INSERTING IT.INSTEAD I WANT TO UPDATE TABLE DATA"
SqlConnection sqlconn = new SqlConnection(ssqlconnectionstring);
OleDbConnection oledbconn = new OleDbConnection(sexcelconnectionstring);
OleDbCommand oledbcmd = new OleDbCommand(myexceldataquery, oledbconn);
oledbconn.Open();
OleDbDataReader dr = oledbcmd.ExecuteReader();
SqlBulkCopy bulkcopy = new SqlBulkCopy(ssqlconnectionstring);
bulkcopy.DestinationTableName = ssqltable;
bulkcopy.WriteToServer(dr);
Console.WriteLine(".xlsx file imported succssessfully into database.", bulkcopy.NotifyAfter);
oledbconn.Close();
}
catch (Exception ex)
{
//handle exception
MessageBox.Show(ex.Message.ToString(), "Warning !");
}
}
|
|
|
|