string problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • roopeman

    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.

  • Dave

    #2
    Re: string problem?

    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" <roopeman@discu ssions.microsof t.com> wrote in message news:9A1A800C-B8F7-447C-A0DE-9BDBF9A1D692@mi crosoft.com...[color=blue]
    > 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.
    >[/color]


    Comment

    • roopeman

      #3
      Re: string problem?

      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:
      [color=blue]
      > 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" <roopeman@discu ssions.microsof t.com> wrote in message news:9A1A800C-B8F7-447C-A0DE-9BDBF9A1D692@mi crosoft.com...[color=green]
      > > 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.
      > >[/color]
      >
      >
      >[/color]

      Comment

      • Ignacio Machin \( .NET/ C# MVP \)

        #4
        Re: string problem?

        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" <roopeman@discu ssions.microsof t.com> wrote in message
        news:A46880BD-1F5A-419E-800E-2094C2757DE2@mi crosoft.com...[color=blue]
        > 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:
        >[color=green]
        >> 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" <roopeman@discu ssions.microsof t.com> wrote in message
        >> news:9A1A800C-B8F7-447C-A0DE-9BDBF9A1D692@mi crosoft.com...[color=darkred]
        >> > 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.
        >> >[/color]
        >>
        >>
        >>[/color][/color]


        Comment

        Working...