Need regex for certain existance

Inputs : $90,400 12.4.2001
$89,478 24.8.2008
need to extract :slightly_smiling_face:
Output: $90,400
$89,478

Hi @Haarish_S

How about this expression

System.Text.RegularExpressions.Regex.Match(YourString,"\$[\d,.]+").ToString

Regards
Gokul

1 Like

I have used
Replace(“\d{2}.\d{2}.\d{2}”,“”)
output : $90,4.12

Hi,

Hope the following sample helps you.

mc = System.Text.RegularExpressions.Regex.Matches(yourString,"\$[\d.,]+")

Main.xaml (8.5 KB)

Regards,

1 Like

Hello Haarish,
Try giving this Regex Condition:
.*(?= )
image

Hope it helps.
Regards

2 Likes

Hi @Haarish_S

Use the below regular expression

System.Text.RegularExpressions.Regex.Matches(yourstringinput.ToString,“(\$\d+\,*\d+)”)

image

Hope it helps!!

1 Like

Hi @Haarish_S

Hi @Haarish_S
\$+\d+\,+\d+
System.Text.RegularExpressions.Regex.Mathces(your string input,"\$+\d+\,+\d+")
Datatype: IEnumerable(System.Text.RegularExpressions.Match)

Hope it helps!!

1 Like

@Haarish_S

1 Like

@Haarish_S

.\d+,\d+

System.Text.RegularExpressions.Regex.Match(YourString,“(.\d+,\d+)”).ToString

type or paste code here

Hope it helps!!

1 Like

System.Text.RegularExpressions.Regex.Matches(yourstringinput.ToString,“$(\d+,\d{3})”)
how abt this

2 Likes

Hi @Haarish_S

\$[\d.,]+

image

1 Like

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