473,701 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

string problem?

the following string was from windows 2000 server print eventlog message, i
want to get the print info. from the string, anybody can help me ?

1)Document 126, Exprot List 04-15.xls owned by jackzhang was printed on
printserver1 via port IP_192.168.0.1. Size in bytes: 46205; pages printed: 2

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Nov 17 '05 #1
3 1195
Please supply more information as to what you are attempting.

If you are asking how to parse the string, you can use any of the static String.* functions for searching. A more robust solution
is to use System.Text.Reg ularExpressions .Regex for pattern matching (if the pattern of the eventlog info will always be the same).

The System.Diagnost ics.EventLog class supplies you with a means for reading event log entries.

Hope that helps

--
Dave Sexton
dave@www..jwaon line..com
-----------------------------------------------------------------------
"roopeman" <ro******@discu ssions.microsof t.com> wrote in message news:9A******** *************** ***********@mic rosoft.com...
the following string was from windows 2000 server print eventlog message, i
want to get the print info. from the string, anybody can help me ?

1)Document 126, Exprot List 04-15.xls owned by jackzhang was printed on
printserver1 via port IP_192.168.0.1. Size in bytes: 46205; pages printed: 2

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Nov 17 '05 #2
Hi,Dave, i just want get the print user,print date,printed pages,print
server,print computer IP Etc from the print eventlog message. pls.help me !

"Dave" wrote:
Please supply more information as to what you are attempting.

If you are asking how to parse the string, you can use any of the static String.* functions for searching. A more robust solution
is to use System.Text.Reg ularExpressions .Regex for pattern matching (if the pattern of the eventlog info will always be the same).

The System.Diagnost ics.EventLog class supplies you with a means for reading event log entries.

Hope that helps

--
Dave Sexton
dave@www..jwaon line..com
-----------------------------------------------------------------------
"roopeman" <ro******@discu ssions.microsof t.com> wrote in message news:9A******** *************** ***********@mic rosoft.com...
the following string was from windows 2000 server print eventlog message, i
want to get the print info. from the string, anybody can help me ?

1)Document 126, Exprot List 04-15.xls owned by jackzhang was printed on
printserver1 via port IP_192.168.0.1. Size in bytes: 46205; pages printed: 2

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.


Nov 17 '05 #3
Hi,

Then you will need to parse the string, a regex should be the best thing in
this escenario.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"roopeman" <ro******@discu ssions.microsof t.com> wrote in message
news:A4******** *************** ***********@mic rosoft.com...
Hi,Dave, i just want get the print user,print date,printed pages,print
server,print computer IP Etc from the print eventlog message. pls.help me
!

"Dave" wrote:
Please supply more information as to what you are attempting.

If you are asking how to parse the string, you can use any of the static
String.* functions for searching. A more robust solution
is to use System.Text.Reg ularExpressions .Regex for pattern matching (if
the pattern of the eventlog info will always be the same).

The System.Diagnost ics.EventLog class supplies you with a means for
reading event log entries.

Hope that helps

--
Dave Sexton
dave@www..jwaon line..com
-----------------------------------------------------------------------
"roopeman" <ro******@discu ssions.microsof t.com> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
> the following string was from windows 2000 server print eventlog
> message, i
> want to get the print info. from the string, anybody can help me ?
>
> 1)Document 126, Exprot List 04-15.xls owned by jackzhang was printed on
> printserver1 via port IP_192.168.0.1. Size in bytes: 46205; pages
> printed: 2
>
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
>


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
10625
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using namespace std; : : vector<string>* getTyphoon()
17
14342
by: Olivier Bellemare | last post by:
I've tried to make a function that returns the middle of a string. For example: strmid("this is a text",6,4); would return "is a". Here is my code: char *strmid(char *texte, int depart, int longueur) { char *resultat = " "; char *temporaire = " "; int nbr;
51
8268
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct code? many thx!
18
7186
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1 QID=\"55111\"><Tag2 AID=\"5511101\"></Tag2></Tag1><Tag1 QID=\"55112\"><Tag2 AID=\"5511217\"></Tag2></Tag1><Tag1 QID=\"5512282\"><Tag2 AID=\"551228206\"></Tag2></Tag1><Tag1 QID=\"55114\"><Tag2 AID=\"5511406\"></Tag2></Tag1><Tag1 QID=\"55115\"><Tag2
32
14853
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if ((someString.IndexOf("something1",0) >= 0) || ((someString.IndexOf("something2",0) >= 0) ||
12
9635
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" & Chr(34) & PopUpWindowTitle & Chr(34) & ", " & Chr(34) & CurrentEventDetails & ")" strTemp += "<BR><A HREF='#' onClick='" & PopupLink & "'>" & EventName & "</A><BR>" The problem I have is that when the string variables or contain a string with an...
4
5273
by: MooMaster | last post by:
After some google searching on the forum I couldn't find any topics that seemed to relate exactly to my problem, so hopefully someone can help me out... I'm running python 2.4.1 on a local Win2K system and doing some work-related development on an AIX box, and I'm running into a problem using cx_Oracle to add some information to an Oracle 9.2 table. I have a table_title defined as a VARCHAR2 data type, and when I'm trying to retrieve...
6
2205
by: tommaso.gastaldi | last post by:
Hi, does anybody know a speedy analog of IsNumeric() to check for strings/chars. I would like to check if an Object can be treated as a string before using a Cstr(), clearly avoiding the time and resource consuming Try... Catch, which in iterative processing is totally unacceptable. -tom
5
3533
by: ThatVBGuy | last post by:
Hello All, I could really use some help with this problem its driving me nuts. I have a small vb app, the goal of the app is to read an html doc into a variable then go through that variable and find and replace some tags. I have 3 functions. 1 to open the doc, the 2nd to find and replace the tags the 3rd to save the info. the code is pasted below : Public Function ReadFileContents(FileFullPath As String) As _ String On Error GoTo...
1
8371
Atli
by: Atli | last post by:
The following small HowTo is a compilation of an original problem in getting some cookie-values through different methods of string-handling. The original Problem was posted as follows: As you can see, there could have been a problem with the split-method. The following short article handles ways around this possible problem, that we couldn't reproduce, but someone may possibly encounter it too sometimes. If nothing else, the shown...
0
8736
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9229
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9083
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7824
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3102
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2035
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.