Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Designing: Using Regular Expressions With the Batch Adapter
 

Classic Java CAPS

Developing Java CAPS Projects

Using SOAP Message Handlers

Creating a Runtime Environment

Designing Business Processes in the Sun Business Process Manager

Working with TCP/IP HL7 Collaborations

Developing Sun Master Indexes (Repository)

Developing Sun Master Patient Indexes

Developing OTDs for Application Adapters

Developing OTDs for Communication Adapters

Understanding the HTTPS OTD

HTTPS Client OTD

HTTPS Server OTD

Using the Batch Adapter OTDs

Overview of the Batch OTDs

BatchFTP OTD

BatchFTP OTD Node Functions

Using the BatchFTP OTD

BatchFTPOverSSL OTD

BatchSFTP OTD

BatchSCP OTD

BatchLocalFile OTD

BatchRecord OTD

BatchInbound OTD

Using Regular Expressions With the Batch Adapter

Using Name Patterns With the Batch Adapter

Creating a New COM and DCOM OTD

To Create a COM OTD

Relaunching OTDs

To Relaunch an Existing OTD

File Adapter Components

File OTD Operations

HL7 OTD Libraries

HL7 Version 2.6 OTD Library

HL7 Version 2.5.1 OTD Library

HL7 Version 2.5 OTD Library

HL7 Version 2.4 OTD Library

HL7 Version 2.3.1 OTD Library

HL7 Version 2.3 OTD Library

HL7 Version 2.2 OTD Library

HL7 Version 2.1 OTD Library

Working With HL7 OTDs

Viewing an OTD Using the OTD Editor

Modifying an OTD Using the OTD Editor

SNA Object Type Definitions (OTDs)

To associate the standard SNA eWay OTD to a new Java Collaboration:

Developing OTDs for Database Adapters

Developing OTDs for Web Server Adapters

Designing with Application Adapters

Designing with Communication Adapters

Designing with Web Server Adapters

SWIFT Integration Projects

Java EE Based Components

Designing with Sun JCA Adapters

About the TCP/IP JCA Adapter

Defining Constants and Variables

Using Database Operations

Developing Sun Master Indexes

Using the JMS JCA Wizard

Using the JAXB Wizard and Code-Seeder Pallete

Using Regular Expressions With the Batch Adapter

A regular expression is a character string in which some characters provide special meaning in regard to matching patterns. This section explains some basic guidelines on how to use regular expressions with the HTTPS.

Regular Expressions: Overview

Regular expressions allow you to specify patterns for file names and directory names. Regular expressions are used for “get” operations (receiving or source), as opposed to name patterns which are used for “put” operations (sending or destination).

The BatchFTP, Batch FTPOverSSL, BatchSFTP, BatchLocalFile, and BatchInbound OTDs allow you to use regular expressions, for example, if you want to access all files with a specific extension.

Regular expressions operate as follows:

Entering Regular Expressions

You can enter a regular expression for the FTP or local file name in a variety of ways, for example, .*\.dat$ or ^xyz.*\.dat$. The first case indicates all files with an extension of .dat. The second case indicates all file names with an extension of .dat whose names start with xyz.

Another example could be file[0-9]\.dat. This expression specifies file0.dat, file1.dat, file2.dat, and so on, through file9.dat. This will also match xyz.file0.dat, xyz.file1.dat, and so on. This type of expression will not exclude anything in front of “file”. To exclude any characters before “file” (to make “file” the exact beginning) use ^file[0-9].dat or \Afile[0-9].dat.

These types of regular expression patterns can be used for a get operation.

Regular Expressions and the Adapter

The adapter provides a File Name Is Pattern or Directory Name Is Pattern configuration parameter after every property that allows a regular expression as an option. This feature allows you to specify that the pattern entered is a regular expression or just a static text entry to be interpreted literally.

Note - Regular expressions will resolve even with a partial match to the file name. The resolution process searches for the file name contents rather than the file name.

Rules for Directory Regular Expressions

There are special considerations you must be aware of when you use regular expressions for directory names. This section describes these restrictions and provides some examples.

Restrictions for Using Regular Expressions as Directory Names

The following restrictions apply when using regular expressions as directory names:

Regular Expression Directory Name Examples

The following are several examples of regular expression directory name usage: