Basic regex expression not working

I have a basic list of values that look like this

  • HLBU 1102357 22GP
  • YES
  • 05.04.2018 00:00
  • 11.04.2018 24:100
  • HLXU 3068990 22GP
  • 05.04.2018 00:00
  • 11.04.2018 24:100:

My end game is to match on the items HLBU 1102357 22GP and HLXU 3068990 22GP but my expressions don’t match if they are anything more than .*. I’ve tried various combinations trying to figure out how regex works with RPA Express. I have worked with regular expressions in the past so I have a pretty good understanding of how they work. And I have tried work in online regex debuggers.

Attached is my sample code. I’m sure it’s something very simple that I’m overlooking as I’m very new to this technology. But I’ve searched and have found nothing that gets me moving forward. Any assistance would be (1.6 KB)

1 Like

Hi, @Craigw, what Regex did you use to check the elements? The variables are empty in the recording that you have shared.

Hi @ashapkina - there are two constant value actions setting re1 and re2. This was one of my many tries and had seen this approach in a post in the forum. Originally I set them as the default value.

Also to clarify, even though my end game is to identify the two elements mentioned above, I’m simply starting basic and goal of re2 should identify the five elements starting with [A-Z].

1 Like

Right, didn’t notice them at first.

There is a small mistake in your IF actions.
You have the text “e” there instead of the variable ${e}, so the Regex is checked against this text. Maybe, there was some issue with the autocomplete.

You need to select the variable from the dropdown when you start typing in the name


Make sure it says “String variable” instead of “String”.

Well I knew it was something simple. Thanks @ashapkina for seeing the simple issue. I was banging my head because I knew the regex should be working, not looking at the bigger picture.

1 Like