in reply to Re^2: Splitting a long row with multiple delimiters.
in thread Splitting a long row with multiple delimiters.

Is it safe to assume that keys not followed by = sign are null? If so, how would you define a key?

For example: key1=abcd key2 key3=123

What is actually expected output? This one?

key1=abcd key2 key3=123
Or this one?
key1=abcd key2=null key3=123
How do you recognize null keys inside the string? Should key2 be treated as key, or is it actually part of value to be stored in key1?

Replies are listed 'Best First'.
Re^4: Splitting a long row with multiple delimiters.
by dipit (Sexton) on Jan 19, 2018 at 14:52 UTC

    yes the keys which donot have "=" (in this case only first value) or have "key=<whitespace>",value will be considered as null or undef.

      Do all the keys which do not have "=" appear at the beginning of the string ?

      poj

        Yes Buddy, fortunately, its only in beginning and that too only single string.