Mask Specific number of characters

Advertisement

eranm
Joined:
Posts:
3

Mask Specific number of characters

Hi,

I'm trying to apply a mask to files, and i know the exact amount of numbers i have in file name.
what is the syntax to accomplish this?
ex:
filename: "Test_12345"
mask: Test_[0-9]{5} - not working
mask: Test_[0-9]* - working

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,846
Location:
Prague, Czechia

Re: Mask Specific number of characters

There's no syntax for that. You have to repeat the set pattern:
Test_[0-9][0-9][0-9][0-9][0-9]

(Btw, Test_[0-9]* does not do what you probably think).

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
33,846
Location:
Prague, Czechia

eranm wrote:

I know the * means 0 or more occurrences, would [0-9]+ work in this case?
I already wrote above that * does not do what you think.
WinSCP file mask is not a regular expression.
See https://winscp.net/eng/docs/file_mask
So + won't work either.

Reply with quote

Advertisement

You can post new topics in this forum