Hi all,
I have multiple cells with something like this: "summar":"null":"score":"SV_0832dmn83bf","project","catalog":
I am trying to parse out just this into a separate column: SV_0832dmn83bf
How can I do this?
thanks!
Solved! Go to Solution.
@kayla_o
What is the cretiria of parse out "SV_0832dmn83bf"?
Maybe you can share a sample input file and desired output with more sample data?
As @Qiu pointed out, we will need more data in order to give you a more robust and dynamic solution. Just with 1 sample row, I can generate the following:
.*"score":"([^"]+).*
Regex with the above, and replace with \1 will get you your data. But I must stress that this works because I have only seen 1 row of data. Regex is pattern based, so if you give more data, the pattern will be spotted more effectively by regex.
Hope this helps.
I think @caltang's Regex is as good as it gets.
Just to clarify the Regex's purpose:
In simpler terms, this expression looks for a piece of text that includes the phrase 'score' followed by a colon and a value enclosed in double quotes. It captures that value, which could be any sequence of characters except another double quote. Then the \1 references that capture group.
There are ways to solve this that don't involve Regex - but are much longer. (i.e., split by Colon, then split again by Comma, then remove double-quotes...)
@AmitMiller wrote:
I think @caltang's Regex is as good as it gets.
Never thought I'd see the day... my Regex is horrible. But thanks to Regex101 and online resources + AI, I learned a great deal! Thanks @AmitMiller
User | Count |
---|---|
76 | |
58 | |
53 | |
47 | |
38 |