Regex group issue getting null value exception

Hi All,

Getting null exception when trying to extract string using groups(1)

My input is

Mortgaged Vehicle: 2018 TOYOTA C-HR

I am using Regex:- (?<=Mortgaged Vehicle:\s)(\d+)\s(\w+)\s(\w.+) in Ui Path the whole input was coming fine now when I am trying to extract only TOYOTA or 2018 or C-HR I am getting null exception .

This is the expression which I have used to extract toyota :- vehicle+IEnRegEx(0).groups(2).tostring

Vehicle is my variable name which has a value =2018 TOYOTA C-HR

anything wrong I am doing here?

test.xaml (6.9 KB)

this is my file

Hi,

Can you try item.groups(2).Value instead of IEnRegEx(0).groups(2).tostring?

Regards,

2 Likes

Thanks @Yoichi it worked

1 Like

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