Unable to replace the text in pdf using Regex

Hi Team,

I’m trying to modify PDF by changing some texts in it by using regex but unfortunately bad luck.

String in PDF to match - Month : June , 2022 Branch:

RE: /Month+[\s]+:+[\s]+[A-Za-z]*+[\s],/gmi

The Regex match in regex101 site and I’ve to change the Month as next coming month

Please help me out,

Thanks

@bhagyac

Can you please also share the sample PDF document for our reference? We will test the scenario in our environment and address it accordingly.

Hi asad,

Thanks for the reply.
PFA pdf for reference. In this PDF I’ve to replace the Month name and no. of days paid, present and week offs. But I’m unable to use Regex matched in regex101.

Please help😑
Salary slip_aspose.pdf (59.8 KB)

@bhagyac

We are working on your requirements and will get back to you shortly.

@bhagyac

Please try to use the below Regex in order to find the Month and Year:

  • (Month :)+[\s]+[A-Za-z]*[\s](\,)\s+\d+