-2

I started learning Reg Ex yesterday as I use the automation software Blue Prism and you can write Reg Ex's.

I need to pull the same data each time (example shown below) and that is the persons KID (in this case J16203), their Payroll number (6554739) and their Contract end date (22/02/14)

I've written /KID ([A-Za-z]){1}\d{4,5} to pull out their KID (which always begins with a letter and then is 4 or 5 digits). How do I add to this to pull out their payroll number and contract end date?

Persons data
This is their KID J16203
Person’s Payroll number 6554739
Contract end date 22/02/14
esqew
  • 42,425
  • 27
  • 92
  • 132
Jordan
  • 1
  • 1
  • 2
    Have you provided your *actual* regular expression? You'll need a named capture group in order to extract anything using the .NET engine and Blue Prism, and I don't see one in the pattern you've provided. – esqew Jan 21 '19 at 13:16
  • 1
    You're also more likely to get a quality answer if you show what you've tried and what hasn't worked. – esqew Jan 21 '19 at 13:17

1 Answers1

0

In this way, you can fetch both KID and Payroll number using one RegExr expression.

/(KID [^a-b]{5,6}|number [0-9]{7})

Anyway, you can always write RegExr expression online by using: https://regexr.com/

PGOEL
  • 566
  • 4
  • 12