I'm having some issues pulling the desired values from my source string.
I have 2 possible string formats (that I'm differentiating based on a -match operation and if check):
{u'specialGroup': u'projectWriters', u'role': u'WRITER'
or
, {u'role': u'WRITER', u'userByEmail': u'[email protected]'
What I desire to return from the regex:
[0]projectWriters
[1]WRITER
and
[0]WRITER
[1][email protected]
Basically I need to return all values between start string : u' and end string ' as array values [0] and [1] but cannot figure out the regex pattern.
Trying:
[regex]::match($stuff[1], ": u'([^']+)'").groups
Groups : {: u'WRITER', WRITER}
Success : True
Captures : {: u'WRITER'}
Index : 10
Length : 11
Value : : u'WRITER'
Success : True
Captures : {WRITER}
Index : 14
Length : 6
Value : WRITER
But no sign of [email protected] value.