RegEx Matches returning 0 instead of proper result. Works in builder and regexstorm

RegEx Matches returning 0 instead of proper result. Works in builder and regexstorm

I know this gets posted a lot, I have looked through a number of posts but cannot find an answer that works.

I am trying to pull 3 pieces of text out of a text file:

fileFormatVersion: 2
guid: eea40a520ca830445b3626a67a90419d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

I setup 3 regexes:

“(?<=fileFormatVersion: )." to get the value of 2 on the first line
"(?<=guid: ).
” to get the value of the guid line
“(?<=mainObjectFileID: ).*” to get the value of mainobject file ID.

I then assign each to a variable, like MatchObject(0).toString

all 3 of them work in the RegEx builder within UI Path, and on Regex storm. But when I run my sequence, the 3rd one returns a value of 0… No errors, just printing a 0 instead of the expected ID.

I can’t seem to edit my post, but wanted to fix the file I am trying to extract from. It has some extra spacing on the line I am having issues with, unsure if related.

fileFormatVersion: 2
guid: eea40a520ca830445b3626a67a90419d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

Can’t delete my post either, now that I see I am an idiot. The sample data I was using was great! Until I looked at the actual data I Was looping through and see that UIPath is doing exactly what its supposed to… case closed.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.