Regular expressions for file/FTP transport within OSB.  How?

The OSB transport/polling guides say for the FILE, FTP and SFTP transports that the "File Mask" can be a Regular Expression but I can't get it to pick up files this way. Is there some trick to enabling regular expression mode or some strange syntax required?
For example I set up a very simple pattern of [A-Z]+ which should match any filename with one or more uppercase alphabetic characters only, but it does not pick up anything. It seems only to support the usual wildcard * operator in the non-regular expression mode.
Any help much appreciated.

Good point, but if you think about this description, you have to realize it just doesn't make sense. Again ...
Enter a regular expression to select the files that you want to pick from the directory. The default value is \*.*The problem is that \*.* is not a regular expression at all. :-)
1. The documentation is a mess in this particular point.
2. FTP servers (at least those I have experienced) don't have a support for regular expressions.
So I guess you can use only wildcards and not regular expressions with FTP transport.

Similar Messages

  • Specifying the filename for outbound FTP transport in OSB

    I want an OSB based service that will send via FTP a file with a specific name to a remote ftp location.
    It appears OSB can't do this because the FTP transport on a business service only allows you to specify the prefix and suffix and then generates a big long file name for the midlle parts.
    Does someone know how to override this and specify the name that you want teh remote file name to be called?

    mdsrobbins wrote:
    Your response was helpful but being new to OSB I'm still not quite there because I want to pass a "variable" to the file name. Now given I want to ftp a CSV file I've specified a proxy messaging service in an MFL format behind a jms queue. The business service underlying this is the ftp service again using the MFL format. This all works but in the message flow I for the proxy I can't seem to get access to a user defined property which contains the filename which I could then pull out and stuff into the "filename" header as suggested above.
    Doe anyone have any ideas how I can get access to a filename property from a JMS message?From what i understand
    JMSQ--- JMS PRoxy (MFL)----Pipeline ----->BS (MFL/FTP)---FTP server
    So you would like to set the filename that is contained the JMS message custom headers?. While creating your JMS Proxy you have to follow these steps
    1) While creating JMS Proxy in Transport Configuration page select Get All Headers =Yes
    2) If file name is set as user defined property in JMS message then use $Header in you pipeline/message flow. This variable will hold your user defined properties. If the user defined property is part of JMS message then use $body.
    thanks
    Manoj

  • Regular expressions in file mask in file protocol

    Hi,
    I wanted to check whether we can use regular expressions to in file mask with file protocol? As per the documentation, we can use regular expression in file mask only in case of ftp/sftp.
    Regards,
    Anuj

    The documentation is not correct at this point. There is no regex support in file mask.
    OSB File Transport Configuratuin - File Mask

  • Regular Expression For Dreamweaver

    I still haven't had the time to really become a professional when it comes to regular expressions, and sadly I am in need of one an finding it difficult to wrap my head around.
    In a text file I have hundreds of instances like the following:
    {Click here to visit my website}{http://www.adobe.com/}
    I need a regular expression for Dreamweaver that I can run within the "Find and Replace" window to switch the order of the above elements to:
    {http://www.adobe.com/}{Click here to visit my website}
    Can anyone provide some guidance? I'm coming up short due to my lack of experience with regular expressions.
    Thank you in advance!

    So you have a string that starts { and goes until the first }.  Then you have another string exactly the same.  And you want to swap them.  I'm not making any assumption that the second one has to look like a URL (that's a whole other minefield, but perhaps you could do something simple like it must start with http). 
    You don't specify how your text file is divided up, have you got this as a complete line to itself, or is it just  a huge block of text?  Preferably as individual lines.
    I don't have Dreamweaver, but this worked for me in Notepad++
    Find: ^{(.*?)}{(.*?)}$
    Replace with: {\2}{\1}
    My file looked like this:
    {Click here to visit my website}{http://www.adobe.com/}
    {some other site}{http://www.example.com/foo}
    And doing a Replace All ended up like this:
    {http://www.adobe.com/}{Click here to visit my website}
    {http://www.example.com/foo}{some other site}

  • Wat should be the regular expression for string MT940_UB_*.txt to be used in SFTP sender channel in PI 7.31 ??

    Hi All,
    What should be the regular expression for string MT940_UB_*.txt and MT940_MB_*.txt to be used as filename inSFTP sender channel in PI 7.31 ??
    If any one has any idea on this please let me know.
    Thanks
    Neha

    Hi All,
    None of the file names suggested is working.
    I have tried using - MT940_MB_*\.txt , MT940_MB_*.*txt , MT940*.txt
    None of them is able to pick this filename - MT940_MB_20142204060823_1.txt
    Currently I am using generic regular expression which picks all .txt files. - ([^\s]+(\.(txt))$)
    Let me know ur suggestion on this.
    Thanks
    Neha Verma

  • Regular Expression for filename

    I want to read XML files,If the filename starts with an alphabet.
    Can anybody tell the regular expression for the same.
    Regards
    V Kumar
    Message was edited by:
    user640551

    thanks dhrmendra,
    i got the solution and correct expression is "[a-zA-z].\*.xml"
    regards
    V Kumar

  • Regular Expression for PathName???

    Anyone have a "ready to go" regular expression for detecting a pathname?
    for example I need to detect the following:
    myfile.txt
    ./myfile.txt
    ../my-file.ini
    /home/my-home/myFile.foo
    etc.
    Now, in a perfect world, it could also do Windows (or ANY OS for that matter) pathnames (though this is not terrbibly important for my case at least).
    TIA,
    /m

    import java.util.regex.*;
    * @author  Ian Schneider
    public class FileRegex {
        static Pattern pattern;
        /** Creates a new instance of FileRegex */
        public FileRegex() {
        public Pattern getPattern() {
            if (pattern == null) {
                pattern = Pattern.compile("([\\/]?(\\w+|\\.|\\.\\.)[\\/])*(\\w+)\\.?(\\w+)?");
            return pattern;
        public String[] parts(String path) {
            Matcher m = getPattern().matcher(path);
            if (m.find()) {
                return new String[] { m.group(1),m.group(3),m.group(4) };
            return null;
        public boolean matches(String path) {
            return getPattern().matcher(path).matches();
        public static final void main(String[] args) throws Exception {
            FileRegex regex = new FileRegex();
            String[] files = {
                "myfile.txt",
                "../myfile.txt",
                "./myfile.txt",
                "/a/b/c/myfile.txt",
                "/a/../myfile.txt",
                "myfile"
            for (int i = 0, ii = files.length; i < ii; i++) {
                System.out.println( files[i] + " match " + regex.matches(files));
    String[] pieces = regex.parts(files[i]);
    if (pieces != null)
    System.out.println(" path : " + pieces[0] + " file : " + pieces[1] + " ext : " + pieces[2]);
    I will leave it to you as an excercise to add support for spaces in path names, different separator characters, etc..

  • How to form a regular expression for matching the xml tag?

    hi i wanted to find the and match the xml tag for that i required to write the regex.
    for exmple i have a string[] str={"<data>abc</data>"};
    i want this string has to be splitted like this <data>, abc and </data>. so that i can read the splitted string value.
    the above is for a small excercise but the tagname and value can be of combination of chars/digits/spl symbols like wise.
    so please help me to write the regular expression for the above requirement

    your suggestion is most appreciable if u can give the startup like how to do this. which parser is to be used and stuff like that

  • Using regular expressions for validation in i18n

    Can we use regular expressions for validation of inputs in a java application taking care of i18N aspects too. Zip code for different locales are different. Can we use regular expressions to validate zipcode inputs from different locales

    hi,
    For that shall i have to create individual patterns for matching the inputs from different locales or a single pattern will do in the case of validating phone nos. around the world, zip codes etc. In case different patterns are required, programmer should have a konwledge of difference in patters for different locales.
    regards
    sdas

  • MQ Transport within OSB - Put to remote Q?

    Hi Guys,
    We're working on a project down under that is targeted at an environment that makes heavy use of IBM's MQ transport.
    In developing with the MQ Transport available from Oracle we've found certain limitations in it's use, specifically:
    1) unable to put to a remote queue definition on the local queue manager.
    2) unable to put a message to a queue existing on a remote queue manager which is defined on the local queue manager.
    These examples are connecting to the local queue manager in tcp (client) mode. Putting to local queues on the local queue manager, or clustered queues visible from the local queue manager work fine.
    Surely there is a way the MQ Transport within OSB can facilitate the above 2 scenarios?
    FWIW, we're using Weblogic version 10.3.0.0 and OSB version 10gR3
    Edited by: user12006489 on Dec 20, 2009 4:09 PM
    Edited by: user12006489 on Dec 20, 2009 4:10 PM

    I should further elaborate on my initial question:
    On the local queue manager is a remote queue manager definition to another queue manager. Using the MQ Transport, how can I send a message to a queue that exists on that remote queue manager?
    In the MQ URI string ends up looking something like mq://REMOTE_QMGER/REMOTE_QUEUE, but this format violates the MQ Transport URI field formatting.
    Has anyone had any experience with this?
    Edited by: user12006489 on Dec 20, 2009 4:57 PM

  • Regular Expression for a Person's Name

    Hi,
    I am using the org.apache.regexp package and trying to find the regular expression for a person's name. It allows only the alphabetic string.
    I tried [a-zA-Z]+. But this also accepts the thing like "BUSH88", which is not what I want...
    Can anybody help me figure this out?
    Thanks in advance,
    Tong

    Hi,
    I am using the org.apache.regexp package and trying to
    find the regular expression for a person's name. It
    allows only the alphabetic string.
    I tried [a-zA-Z]+. But this also accepts the thing
    like "BUSH88", which is not what I want...
    Can anybody help me figure this out?
    Thanks in advance,
    Tongtry this:
    ^[a-zA-Z]+$
    the ^ represents the start of the String and the $ represents the end.
    So the expression is saying: "between the beginning and the end of the String there will only be alphbetical characters"

  • How to write the regular expression for Square brackets?

    Hi,
    I want regular expression for the [] ‘Square brackets’.
    I have tried to insert in the below code but the expression not validate the [] square brackets.
    If anyone knows please help me how to write the regular expression for ‘[]’ Square brackets.
    private static final Pattern DESC_PATTERN = Pattern.compile("({1}[a-zA-Z])" +"([a-zA-Z0-9\\s.,_():}{/&#-]+)$");Thanks
    Raghav

    Since square brackets are meta characters in regex they need to be escaped when they need to be used as regular characters so prefix them with \\ (the escape character).

  • Need a regular expression for the text field

    Hi ,
    I need a regular expression for a text filed.
    if the value is alphanumeric then min 3 char shud be there
    and if the value is numeric then no limit of chars in that field.[0-9].
    Any help is appriciated...
    thanks
    bharathi.

    Try the following in the change event:
    r=/^[a-z]{1,3}$|^\d+$/i;
    if (!r.test(xfa.event.newText))
    xfa.event.change="";
    Kyle

  • Regular Expression for /, \, #, -, & ‘

    Hi,
    Can anybody tell me the regular expression for provided characters.
    Code is preferable.
    Thanks in advance.

    "[-/\\\\#&']"

  • What is the regular expression for the end of a story?

    Forgive me if this is wrong forum for asking this, but I'm trying to use the Find command using GREP and I need to know the regular expression for the end of a story. (Or, the last character of a story.) Thanks in advance.

    I'd try search for .\z (that's a dot in front) which ought to find the very last character in the story, and replace with $0 and your additional text.
    You know you can use a keyboard shortcut to move your cursor to the end of any story, right? Ctrl + End on Windows, Cmd + End, I think, on Mac. Unless you want to do this to every single story in the document, I would think you might be just as well off to put your text on the clipboard, put the cursor in the story and hit the key combo followed by Ctrl/Cmd + V to paste.

Maybe you are looking for