Another regex

(?<=Total Current Charges )[$\s0-9,.]+
How to change the above regex to include or not include soaces in the amount after $
For example it can be
Current charges $12,312.94
or
Current Charges $ 6435.12

Thans much

Hi @A_Learner

Try this

((?<=Current Charges )|(?<=Current charges )).*

(?<=(Current Charges \W+)|(Current charges \W+))(\d+\,?\d+\.?\d+)

I hope it helps!!

1 Like

(?<=(Current\s+Charges\s+)|(Current\s+charges\s+))(\W+\d+,?\d+.?\d+)

@A_Learner

(?<=Current charges)[$\s0-9,.]+|(?<=Current Charges)[$\s0-9,.]+

hey @A_Learner
Try this below regex

(?<=Current charges|Current Charges) $\s?[0-9](,?[0-9]).?[0-9]

If you have Total then add Total in positive lookahead
For Eg: (?<=Total Current charges|Total Current Charges)

1 Like

@A_Learner
Try the below regex expression

(?<=(Current\s+Charges\s+)|(Current\s+charges\s+)).*

OR Else use the below expression

(?<=(Current\s+Charges\s+)|(Current\s+charges\s+))(\W+\d+\,?\d+\.?\d+)

If you don’t want the dollar to be included please use below regex expression

(?<=(Current\s+Charges\s+\W+)|(Current\s+charges\s+\W+))(\d+\,?\d+\.?\d+)

Hope it works!!

@A_Learner

(?<=Current charges)[$\s0-9,.]+|(?<=Current Charges)[$\s0-9,.]+

@A_Learner

(?<=Current Charges ).*

Thank you, @Vikas_M

Thanks every one!
You provided great solutions. I like this one better and marked as solution.

Hello @A_Learner

I see you have a solution but here is another option :blush:

(?<=Current [cC]harges\s$\s*)[\d\.\,]+

image

Cheers

Steve

Oh! Super nice solution!
Thanks,

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