Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] split question...

Expand Messages
  • Ben Maynard
    Jaeho Can you not add another delimiter? ie: ifIndex=222~sysDescr= I am a PC ~ifOperStatus=2 If so then you can do a split. split /~/, $line That would be
    Message 1 of 3 , Dec 5, 2003
      Jaeho

      Can you not add another delimiter?

      ie:

      'ifIndex=222~sysDescr="I am a PC"~ifOperStatus=2'

      If so then you can do a split.

      split /~/, $line

      That would be the easiest method, if you can't do that
      and your line will always take the same format eg:

      key=value key="value" key=value

      Then a regular expression will do the job.

      HTH

      Ben

      --- Jaeho Kim <jaehokim1@...> wrote: > How can I
      separate name value pairs if one of the
      > values contains
      > spaces?
      >
      > Ex:
      >
      > $line = 'ifIndex=222 sysDescr="I am a PC"
      > ifOperStatus=2'
      >
      > into:
      >
      > ifIndex=222
      >
      > sysDescr="I am a PC"
      >
      > ifOperStatus=2
      >
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > Unsubscribing info is here:
      > http://help.yahoo.com/help/us/groups/groups-32.html
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >

      ________________________________________________________________________
      Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs
      http://www.yahoo.co.uk/robbiewilliams
    Your message has been successfully submitted and would be delivered to recipients shortly.