Having trouble figuring out dictionary keys...

by EKreag » Fri Feb 10, 2017 8:29 pm

Hello all,

I am relatively new to SharePoint, and am currently using SP Online (365).

I am using "Regular Expression Match" (which creates a dictionary of matches) and then attempting to retrieve the match(es) to string(s).

RegEx: \(Originator\)<\/i>\s+.+\n.+
Dictionary created: [{"0":"(Originator)<\/i>\u000d\u000a\u000d\u000a\u000d\u000a\u000d\u000aMatt Pennell\u000d\u000aStartown Vet\u000d"}]

I have tried [Get "0" from Variable: ShipTo (Output to Variable: ShipToString )], which causes a runtime error that I cannot use just the index.
I have tried [Get (0)/"0" from Variable: ShipTo (Output to Variable: ShipToString )], which returns and empty string.

If I want the long string ("(Originator... ") returned, how do I reference it?

I am also trying this with multiple matches and am having difficulties.
Dictionary:
[{"0":"Green Mop Bucket \u000d\u000a3\u000d","1":"ea"},{"0":"Red MicroFiber Mop Head\u000d\u000a4\u000d","1":"ea"},{"0":"1 Gallon General Purpose\u000d\u000a5\u000d","1":"ea"},{"0":"1 Gallon Multi-Purpose\u000d\u000a6\u000d","1":"ea"},{"0":"(12) Yellow MicroFiber Cloth 16x16\u000d\u000a7\u000d","1":"pk"},{"0":"Speed Change Mop Handles \u000d\u000a8\u000d","1":"ea"}]


Please, please, please help.

Thank you.
EKreag
 
Posts: 1
Joined: Fri Feb 10, 2017 3:12 pm

by Roman Rylov » Mon Feb 20, 2017 8:01 am

Hello,

Sorry for the delay.
Please check out an example that prints all matches:
RegexSample.png
RegexSample.png (75.94 KiB) Viewed 283 times
User avatar
Roman Rylov
 
Posts: 335
Joined: Tue Nov 11, 2014 6:25 pm


Return to Workflow Actions Pack for Office 365