473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 1183
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.RegularExpressions.Regex for pattern matching (if the pattern of the eventlog info will always be the same).

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

Hope that helps

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"roopeman" <ro******@discussions.microsoft.com> wrote in message news:9A**********************************@microsof t.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.RegularExpressions.Regex for pattern matching (if the pattern of the eventlog info will always be the same).

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

Hope that helps

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"roopeman" <ro******@discussions.microsoft.com> wrote in message news:9A**********************************@microsof t.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******@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.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.RegularExpressions.Regex for pattern matching (if
the pattern of the eventlog info will always be the same).

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

Hope that helps

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"roopeman" <ro******@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.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
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...
17
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,...
51
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...
18
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...
32
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...
12
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(" &...
4
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...
6
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...
5
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.