Hi guys,any one has reply I want only number below text "k ramakrishna $2500"

I want only numbers in particular word like

" k ramakrishna $2500",I am using get text after message box which code Will write "

Hi @killarapusiva

Welcome to the UiPath Forum.

You can use regex to extract numbers from the string.

1 Like

I’m already taken matches activity , and select digit, message box not showing a digits,which code will write.

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"\d+").Value

Regards,

1 Like

Hi,

Can you share why you use substring method?

Regards,

Hi,

Can you share your requirement : input and output you expect?

Regards,

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"[,\d]+").Value

Regards,

Can you share accurate content of your string variable using WriteLine activity or MessageBox activity?

Regards,

Thnq bro

but Another way only alphabets ,
Screenshot_2022_0213_065010

Above picture I want only name “Mantra Mobiles MMRJY” Remove "-"How can i do

Hi,

We can achieve it using String.Replace method like yourString.Replace("-"," ")

Regards,

Hi, I want only name in below picture

Like “Ravi Rao”

How can i do

Regards
K siva

Hi,

Can you try the following?

System.Text.RegularExpressions.Regex.Match(yourString,".*?(?=\s*\p{Sc})").Value

Regards,

Hi,

I want only “Ravi Rao”,
Thanks
Regard
K siva

Hi,

The following will work.

 System.Text.RegularExpressions.Regex.Match(yourString,"(?<=^\S+\s+).*?(?=\s*\p{Sc})").Value

Regards,

Hey,
It works ,but it’s works only on “Ravi Rao” . I wana works different names like “Surya sai”,“Anil Joy” e.t.c…
Thnq
Regards
K siva

Hi,

Can you share accurate input string and output?

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.