I have a string:
User{self=https:example.com, name=S1234, displayName=Johny B, accountId=null, [email protected], active=true}'
I try to capture group and get Johny B
in sed.
I have proper regex: displayName=(.*?),
but below sed command return me all string:
's/.*displayName=\(.*?\),/\1/'
's/.*displayName=\([^/]*\),/\1/'
I get substring starting ofJohny B
to the end of string's/.*displayName=\([^,]*\),/\1/'
, not a slash.