Specifying a Naming Pattern

Oracle JCA Adapter for FilesFTP 4-39

4.3.1.3.2 Including and Excluding Files

If you use regular expressions, the values you specify in the Include Files and Exclude Files fields must conform to JDK regular expression regex constructs. For both fields, different regex patterns must be provided separately. The Include Files and Exclude Files fields correspond to the IncludeFiles and ExcludeFiles parameters, respectively, of the inbound WSDL file. If you want the inbound Oracle File Adapter to pick up all file names that start with po and which have the extension txt, then you must specify the Include Files field as po.\.txt when the name pattern is a regular expression. In this regex pattern example: ■ A period . indicates any character. ■ An asterisk indicates any number of occurrences. ■ A backslash followed by a period \. indicates the character period . as indicated with the backslash escape character. The Exclude Files field is constructed similarly. If you have Include Files field and Exclude Files field expressions that have an overlap, then the exclude files expression takes precedence. For example, if Include Files is set to abc.txt and Exclude Files is set to abcd.txt, then you will not receive any abcd.txt files. Notes: ■ If you later select a different naming pattern, ensure that you also change the naming conventions you specify in the Include Files and Exclude Files fields. The Adapter Configuration Wizard does not automatically make this change for you. ■ Do not specify . as the convention for retrieving files. ■ Be aware of any file length restrictions imposed by your operating system. For example, Windows operating system file names cannot be more than 256 characters in length the file name, plus the complete directory path. Some operating systems also have restrictions on the use of specific characters in file names. For example, Windows operating systems do not allow characters such as backslash\, slash , colon :, asterisk , left angle bracket , right angle bracket , or vertical bar|. Note: The regex pattern complies with the JDK regex pattern. According to the JDK regex pattern, the correct connotation for a pattern of any characters with any number of occurrences is a period followed by a plus sign .+. An asterisk in a JDK regex is not a placeholder for a string of any characters with any number of occurrences. Note: You must enter a name pattern in the Include Files with Name Pattern field and not leave it empty. Otherwise, the inbound adapter service reads all the files present in the inbound directory, resulting in incorrect results. 4-40 Oracle Fusion Middleware Users Guide for Technology Adapters Table 4–3 lists details of Java regex constructs. Note: Do not begin JDK regex pattern names with the following characters: plus sign +, question mark ?, or asterisk . Table 4–3 Java Regular Expression Constructs Matches Construct Characters - The character x x The backslash character \\ The character with octal value 0n 0 = n = 7 \0n The character with octal value 0nn 0 = n = 7 \0nn The character with octal value 0mnn 0 = m = 3, 0 = n = 7 \0mnn The character with hexadecimal value 0xhh \xhh The character with hexadecimal value 0xhhhh \uhhhh The tab character \u0009 \t The new line line feed character \u000A \n The carriage-return character \u000D \r The form-feed character \u000C \f The alert bell character \u0007 \a The escape character \u001B \e The control character corresponding to x \cx - - Character classes - a, b, or c simple class [abc] Any character except a, b, or c negation [abc] a through z or A through Z, inclusive range [a-zA-Z] a through d, or m through p: [a-dm-p] union [a-d[m-p]] d, e, or f intersection [a-z[def]] a through z, except for b and c: [ad-z] subtraction [a-z[bc]] a through z, and not m through p: [a-lq-z]subtraction [a-z[m-p]] - - Predefined character classes - Any character may or may not match line terminators - A digit: [0-9] \d A nondigit: [0-9] \D A white space character: [ \t\n\x0B\f\r] \s A nonwhitespace character: [\s] \S A word character: [a-zA-Z_0-9] \w