cancel
Showing results for 
Search instead for 
Did you mean: 

File Exculsions in SFTP - regular expressions

0 Kudos

Hi PI experts,

Could you please suggest the Regular Expression to be used for excluding a file to pick from SFTP and process from PI. It's most urgent, need your help.


There are some files with BIAC20130209.SRL1234569.Pro, PI need not to pick the files with extension .PRO (Processed files), and it should pick the remaining files BIAC*.
Example files to pick: BIAC1234abc.SNL12345.ok; BIAC1234abc.SNL12345.dlv, e.t.c

Currently I am using the regular expression for all the files, but I need an REGEX to achieve the above exclusion of one file and picking up remaining, kindly suggest your views and experiences.

Regards,

Sri

Accepted Solutions (1)

Accepted Solutions (1)

gagandeep_batra
Active Contributor
0 Kudos

Check the below thread that may help.

http://scn.sap.com/thread/3249516

and try following link also:

http://www.fusion-reactor.com/fr/help/creating_a_regular_expression_exclusion.htm

and check with     [^.PRO]

Regards

Gagan

0 Kudos

Hi Gagandeep,

Thanks for the information, will check this and update you.

-sri

Former Member
0 Kudos

Hi,

Negative lookahead (?!\.PRO) will help but I am not sure how to write regular expression with that.

Regards,

Beena

Former Member
0 Kudos

Hi,

Please check if this works:

^BIAC((?!\.Pro$)[\w.])+$

Regards,

Beena

Answers (1)

Answers (1)

smavachee
Active Contributor
0 Kudos

Refer this blog by Rajasekhar for REGEX use cases..

I will suggest before getting into REGEX, refer below blog by Mickael and also check the last link provided, it may help you.

Exclude files in a Sender File Adapter

Be careful with parameter entries.

Hope it helps.!

Regards,

Sunil

0 Kudos

Hi Sunil,

I am using SFTP adapter in my sender channel. So the exclusion mask is not available, so I am going for regular expressions for this.

Thanks,

Sri