Hi,
I need help parsing this with regex:
e.a@c.com","DisplayName":"e,a ","Email":"e.a@c.com","Picture":"hps://sharepointco/_layouts/UserPhoto.aspx?Size=L&AccountName=e.a@c.com"
All i need from this is the DisplayName without quotations: e,a
How may I go about this?
Solved! Go to Solution.
Hi @SyedA
I wouldn't use regex - I would do text to rows on commas, then text to columns on colons. From there the data is split out appropriately. Then I use a replace function to remove the quotes.
Note, I used the below as sample data, the beginning of your sample seems to be cutoff or a copy of the email piece:
"DisplayName":"e,a ","Email":"e.a@c.com","Picture":"hps://sharepointco/_layouts/UserPhoto.aspx?Size=L&AccountName=e.a@c.com"
this works for your sample data
regex_replace([Field1],'.*DisplayName":"(.*)\s".*',"$1")
what parse regex formula could I use if I just wanted "DisplayName" and to remove everything else after?
"DisplayName":"e,a ","Email":"e.a@c.com","Picture":"hps://sharepointco/_layouts/UserPhoto.aspx?Size=L&AccountName=e.a@c.com"
Hi @SyedA
You could try this, although I recommend my first solution to fully parse all the data, then you can filter as needed.
"DisplayName":"(.*)\s".*
Did you try my formula? It worked in your sample data...
it did not work
@SyedA Please share the sample data in excel or in a yxzp file mine and @apathetichell's solution are working fine for me.
Did you put it in regex tool/parse or a regular formula field? Mine is designed for a regular formula tool... for a parse tool you'd put:
.*DisplayName":"(.*)\s.* in the parse tool - or something like that...
Can you confirm that there will be only 1 display name per record?
this worked! thank you
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |