Regex to get the words after matching string
But I need the match result to be … not in a match group… For what you are trying to do, this should work. \K resets the starting point of the match. \bObject Name:\s+\K\S+ You can do the same for getting your Security ID matches. \bSecurity ID:\s+\K\S+