NEED HELP TO BUILD REGULAR EXPRESSION

Can someone please help me here above solution is fine but the description will be always like below text which starts with “*** Submitted” in that line i wanted to pick “JG028315”

Which always 8 digit starts with alphabet and ends with number. Please find the below full text.

*** Submitted 1/31/2020 9:51:33 AM - Goode, Jimmy [Universal ID: JG028315] - 2127709
== User Information for Request ==
Goode, Jimmy [Universal ID: JG028315]

NETWORK IMPLEMENTATION TECH III
100 S CINCINNATI AVE
TULSA OK 74103
UK VETTED: no
NSA SCREENED: yes
MANAGER: Springman, Bart [Universal ID: BS028391]
== Details of This Request ==
RESOURCE: Service Activation Orchestration
ACCESS TYPE: userAdmin
Description: This is a support role to be able to Add users and Assign permissions Via an Audio request. DCI_PROV
TYPE: app
Auto Provisioned: Yes
ADMIN: Global - Service Desk - Tier 1

Approved: AAM1 - Wang, Jin-Gen
By: Adkins, James M (Jim) - 2/3/2020 9:14:26 AM
Notes: Approved by U0204670

Approved: Manager - BS028391
By: BS028391 - 2/4/2020 3:50:26 AM
== Additional Information Of This Request ==
Please provide the same level of access as Greg Lane.

Please provision user access for:
Service Activation Orchestration
userAdmin

Please provide the same level of access as Greg Lane.

AUDIO Platform: Service Activation Orchestration
ITPKM ID: 6603
Assignment Group: Global - Service Desk - Tier 1

Hi
If this string is placed in a variable named str_input then use a assign activity like this
str_output = System.Text.RegularExpressions.Regex.Matches(str_input.ToString,”[A-Z]+[0-9]+”)(0).ToString.Trim

Cheers @Shaik.Yezdani

1 Like

Hello @Shaik.Yezdani,

Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime

1 Like

@Palaniyappan it is picking all the values matching, but it should take the value from the line which starts with " *** Submitted". The quoted text always same can you please take " *** Submitted" as reference and give the regex please.
Please find the below screen shot for your referance

thats is why he told you to get only the first match…

Yes this expression will take only the first match which is our required value
@Shaik.Yezdani

@Palaniyappan @bcorrea We are not sure about the position. It might vary but it will come after ***Submitted

1 Like

@Shaik.Yezdani
image
take the green one …group 1

2 Likes

[A-Za-z]{1,2}\d{6,8}
@Shaik.Yezdani
tested here it’s picking all the matches which starts with Alphabet and ends with number!
you can check the sample! by clicking below link.
cheers @Shaik.Yezdani

Hi
I think what @iVishalNayak suggested would work @Shaik.Yezdani

Cheers

@iVishalNayak Universal ID also might not be fixed. Only “***Submitted” text will be fixed. Can you please take “***Submitted” as reference and write it.

1 Like

Hi
Try with this expression

And get the group1 value of it

Cheers @Shaik.Yezdani