Expression to match specific file name format

I am trying to process a specific file with path as “C:\Users\seema.jethe\Downloads\Test\PAN_234.pdf or jpg” from an array of files
Can anyone tell me what should be the expression in else if condition to match the above file path only?
Below is the ss

@Seema_Jethe

String.Endswith(“.pdf”)

Hope this help you

Thanks

@Seema_Jethe

Also you can add as below

String.Contains(“PAN”) and String.Endswith(“.pdf”)

Hope this will help you

Thanks

(post deleted by author)

Hi,

We can use contains match like below as suggested by @Srini84 . please try and let us know. thanks

documentpath.tostring.Endswith(“.pdf”) OR documentpath.tostring.Endwith(“.jpg”)

@Srini84 i tried using your expression but is has some error
below is the ss

@Seema_Jethe I think you need to you or instead of AND.

It is not error, can you please run and see if it is giving excepted output.

@Seema_Jethe

Is that you are not true even you pass the correct file which contain PAN and which ends with pdf?

Then check whether the PAN is in upper case in the file name or not

If not then you can write as

String.Tolower.Contains(“pan”)

Hope this will help you

Thanks

Hi,

One curious question what is this documentPath whether it is string object? please let us know. thanks