NEED REGEX

Hi Team,

I wanted to pick the text which starts with U, below is the text. Please help me with this thanks in advance.

Service Activation Orchestration - FIELD for ID coker.akin (Akin Coker U0217103)
Service Activation Orchestration - VA for ID coker.akin (Akin Coker U0217103)
Service Activation Orchestration - NSDS for ID coker.akin (Akin Coker U0217103)
Service Activation Orchestration - FSS for ID coker.akin (Akin Coker U0217103)
Service Activation Orchestration - PNA for ID coker.akin (Akin Coker U0217103)

(?<=U).[0-9]*

do you need that U also??
if yes you can try this
(?<=Akin Coker).[0-9A-Za-z]*

if you want only numbers try this (?<=U).[0-9]*
cheers @Shaik.Yezdani

you can test your regex here https://regex101.com/r/W6wUN8/1
cheers

1 Like

Hi, sorry.
Can you explain can i use that?
I’ve open regex101, paste my string, and then?

Thx

and paste this in pattern block
(?<=Akin Coker).[0-9A-Za-z]*
thats it

after pasting your string you have to write a regex pattern to match!

1 Like

Thanks a lot!
You have some advice on where i can find some resources to study?

for regex?

Yes!

@Pradeep_Shiv text can be anything i need including U

Please check below texts for more example

Service Activation Orchestration - TSDS for ID holland.jacque (Jacqueline Holland U0202492)
Service Activation Orchestration - READONLY for ID singh.rameet (Rameet Singh U0232880)
Service Activation Orchestration - INFRA_PNA for ID u1291287 (Rakesh Rout U1291287)
Service Activation Orchestration - READONLY for ID nayakoti.vishal (Vishal Nayakoti U0249686)
Service Activation Orchestration - READONLY for ID U1282464 (Pavan Bingi U1282464)
Service Activation Orchestration - COIT for ID nekita.sergei (Sergei Nekita U0180541)
Service Activation Orchestration - neouser for ID nekita.sergei (Sergei Nekita U0180541)

no resources mate!
just learning from forum and internet

you need only numbers or you need numbers including that U

I need including U, It will always starts with U only

[U]\d+
no problem try this @Shaik.Yezdani

https://regex101.com/r/W6wUN8/2 tested here it’s working

2 Likes

@Shaik.Yezdani

use above solution with Matches function you will get all values in IEnumerable type.
use loop to get each value.

2 Likes

@Pradeep_Shiv Thank you so much…

Cheers

2 Likes

Sure…!! Thanks

close this thread by marking it has a solution
cheers @Shaik.Yezdani

1 Like

@Pradeep_Shiv Can you 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