I want to fetch only Net Weight amount from pdf with Find Matching Patters?

Hi ,

I have below text in pdf

Your Reference No.: CASE
Net Weight: 104.54 LB Carrier:
Payment Terms: 1%15 N30 Service Level:

I want to fetch match New Weight mount only.

Hear expecting Ans : 104.54

How to get this ?

Hi @rama_krishna_Rao

Give the parameters like below:

Text to Search in: yourPDFTextOutputvariable

Pattern: (?<=Net Weight\:\s*)\d+[.,]?\d+

First Match: Create a output variable say Output and print it using Message Box.

Regards

1 Like

Hello

Try this Regex pattern - preview it here:

(?<=Net Weight:\s*)[\d.,]+

Insert the following into an Assign:
system.Text.RegularExpressions.Regex.Match(yourString, “(?<=Net Weight:\s*)[\d.,]+”).ToString

A Regex Tester on REGEX STORM.NET successfully matches the pattern "(?<=Net Weight:*)[.]+", highlighting the value "104.54" in the input text. (Captioned by AI)

Cheers

Steve

1 Like

Thanks a lot @Steven_McKeering!!

It’s working fine.

Thanks,
Rama

Glad I could assist.

Please mark as solution so others can find it :slight_smile:

1 Like

Hie @rama_krishna_Rao here’s my way to extract the number you want as an output
your input- as example


manipulation to get the result


cheers Happy Automation :smile:

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