文字列内の複数のファイル名を検証するには、正規表現が必要です。
例えば:
a.html
有効です。
複数のファイルの場合はa.html;b.html
、である必要があり、
2つを超える場合は。である必要がありますa.html;b.html;c.html
。
間違った表現:
1) a;b.html
2) a.html;b
3) a;b
4) a.html;
5) a.html;b;
6) a.html;b.html;
文字列がで終わる場合は、;
別の有効なファイル名(c.html
)が必要です。
私のコードは次のとおりです。
regex": /^([a-zA-Z]:\\)?[^\x00-\x1F"<>\|:\*\?/]+\.[a-zA-Z]{3,4}$/,
alertText": "* Only (;) and (.) are Allowed