Nathan is the word how do i search with regex patten in uipath

Nathan L. Majors is the word how do i search with regex

i want to do it with regex
patten Please do the needful

Hi @T_Y_Raju ,
Can you share input and expect output?
regards,
LNV

[A-Z-a-z\s+.]+
image
Try this!

however it would vary depending upon the entire input string ,So if possible please share the overall input

or use assign activity
system.text.regularexpressions.regex.ismatch(yourstring,“Nathan L. Majors”)

it should check for contains any word of the name

you can try like this

System.Text.RegularExpressions.Regex.IsMatch(“Nathan L. Majors”,“Nathan”)

it will give the true as out put

@T_Y_Raju

@T_Y_Raju

system.text.regularexpressions.regex.ismatch(yourstring,“[A-Za-z]+”)

gives you the true or false

this for exact match or for contains

[quote=“Shiva_Nikhil, post:6, topic:574724”]
system.text.regularexpressions.regex.ismatch(yourstring,“[A-Za-z]+”)
[/quo

how do i take this expresion

Would you please elaborate on where exaclty you are matching the string (Nathan L. Majors)?

take

assign activity

boolvariable=expression

can you explain which text you want to match in that entire text

for the reference you can see the screenshot

Cheers @T_Y_Raju

Hi @T_Y_Raju

Use this Regex Expression in Find Matching Patterns activity:

[A-Za-z.].*

Use this syntax in assign acitivty:

System.Text.RegularExpressions.Regex.Match(inputstring,"[A-Za-z.].*").Value

This will return the single value.

Hope it helps!!
Regards,

@T_Y_Raju it will match the string

then use string.contains(“Nathan L. Majors”)