Page 1 of 1

Replace with template

Posted: Tue Aug 05, 2008 10:00 am
by yeli
Hello,

I use the jFileUpload in FTP-Mode. How can I replace two Points (..) in Filenames before the upload starts?

This:
<param name="param8" value="template">
<param name="value8" value=":regex=[^\.\.]:._.:">

dont work.

Re: Replace with template

Posted: Tue Aug 05, 2008 7:31 pm
by support
To replace all ".." by "._." you can try:
<PARAM NAME="template" VALUE=":regex=\\.{2}+:._.:">

But if you want to replace all "... and more" by "._." then you can try:
<PARAM NAME="template" VALUE=":regex=\\.{2,}+:._.:">

"2," mean at least two occurrences. For instance, it will convert:
gé..@...!çroup1..test.jpg into gé._.@._.!çroup1._.test.jpg

Does it help ?

Re: Replace with template

Posted: Wed Aug 06, 2008 5:58 pm
by yeli
Great! It works fine.

Many thanks!