Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • For example only, i made key names ending with number. But in actual requriement, it might be a simple KEY with out a number. So I need to relay on first space only. to split the Key and rest all values. Commented Dec 22, 2021 at 2:33
  • The regular expression will still match on a KEY without a number since the * token matches zero or more digits. Commented Dec 22, 2021 at 2:41
  • A simpler and more flexible regex operation might be: sed 's/^[^ ]* //' - "beginning of line"+"zero or more occurrences of any character but a space"+"space". Commented Dec 22, 2021 at 10:08