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

Similar Messages

  • Regular Expressions, include and exclude xml-files

    Hi!
    I have a javaprogram that should read xml-files from a directory. The program could contain several types of files but it should only read files with a certain pattern.
    The file names will look like this:
    "resultset_27_23.xml"
    where the numbers will change, but the rest of the file name is the same (resultset_XX_XX.xml).
    But in the same directory it will also be files with the following pattern:
    "resultset_27_23_attachment1.xml"
    Here, the numbers could change in the in the same way as the files above, and the number after the text (attachment) could also differ from file to file.Those files should not be read by the program.
    I have tried to write a regular expression pattern that only reads the first file types, and exlcudes the other ones, but it won�t work.
    Does anyone have a solution to my problem? It is possible to use either just one pattern, or two patterns; one for the files that should be included, and one for the files that should be excluded.

    So you only want files that match resultset_XX_XX.xml? Will the numbers always be two digits each? Assuming so:
    "^resultset_\\d\\d_\\d\\d.xml$"Depending which methods you use, the ^ and $ may or may not be necessary.
    If that's not what you meant, please clarify.

  • Regular Expression to Search Comma Delimited File for any of 3 Values

    Hi,
    I'd like to parse a table column that contains a comma delimited string for any of 3 values, 1200, 1400, 1600 just to see if they're present using Regexp_instr. If someone has an expression available please pass it along.
    Thanks,
    Victor

    Or you could do it like this too...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as id, '1000,2000,3000' as txt from dual union all
      2             select 2, '1200,1300,1400' from dual union all
      3             select 3, '1000,1300,1600' from dual)
      4  -- end of test data
      5  select *
      6  from t
      7* where regexp_like(txt,'(^|,)(1200|1400|1600)(,|$)')
    SQL> /
            ID TXT
             2 1200,1300,1400
             3 1000,1300,1600

  • Receive Location picks up files not equal to file mask

    Hi,
    I have a solution with two Receive Ports. Each port has one Receive Location bound to it and they both point to the same file directory but with different file masks.
    RL1 has file mask F5*.xml
    RL2 has file mask XC5*.xml
    I have noticed one or two times that RL1 is picking up files with the wrong file mask. File XC5040976.916.xml was picked up by RL1 with the result that the wrong map is applied. I am using two ports because the root node is the same in both schemas
    and this was the simplest way to separate them.
    Do you think this is a bug? The workaround would be to also have separate file directorys but I should not have to do that. In my opinion the different file masks should be enough.
    Any ideas?
    Regards
    Anders

    Are you sure that one of two things is not happening:
    - The files being written has temporary names while being written and are not locked?
    - It is actually the correct Receive Location that picks up the message but something else in your logic is wrong?
    Can you try to disable RL2 and verify whether or not RL1 ever picks up a file that begins with XC5..?
    Morten la Cour

  • 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 and XML

    Hello,
    I have an XML file containing regular expressions and i parse the file, extract the pattern from it and search for it using java regex package. The problem is it works fine when patterns are words but when the pattern is something like
    write \\d+ (write followed by a space followed by one or mre digits) it doesn't work.
    I wrote the same code but with the pattern embedded in it,ie. without using XML and it worked. But when extracting with XML it fails.
    Also if the pattern is write[0-9] it only extracts write[0-9 and gives an error of no closing bracket.
    Could anyone please tell me what i am missing out
    Thank you

    thank you for your replies. Well i have still no got over the problem so i am posting my code here and hoping it can get solved
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import java.io.*;
    import java.util.regex.*;
    class textextractor extends DefaultHandler{
         boolean regex=false;
    public void startElement(String namespaceURI,String localName,String qn,Attributes attr)
              if(localName.equals("REGEX"))
               regex=true;
    public void characters(char [] text,int start,int length)throws SAXException {
              String t=new String(text,start,length);
              boolean flag=false;
              if(regex==true)
                Pattern pattern;
                  String w=new String(t);
              pattern = Pattern.compile(w);
              Matcher matcher;
              matcher=pattern.matcher("there is a bat   read  write 13    error at line ");
              while(matcher.find())
               flag=true;
               System.out.println("I found the text \"" + matcher.group() +"\" starting at index "
               + matcher.start() +"and ending at index " + matcher.end() + ".");
             if(!flag)
               System.out.println("not found");
             regex=false;
    public class saxt2 {
         public static void main(String args[]) {
              try {
                    XMLReader parser= XMLReaderFactory.createXMLReader();
                    ContentHandler handler=new textextractor();
                    parser.setContentHandler(handler);
                                    parser.parse("d:\\regex.xml");
                  }catch (Exception e) {
                   System.err.println(e);
    }The xml file is
                      <RegularExpression>
                      <REGEX>write</REGEX>
                      <REGEX>write \\d+</REGEX>
                      <REGEX>read[0-9]</REGEX>
                      </RegularExpression>by running the code you can see that write is found,write \\d+ doesn't match write 13 in the string and read[0-9] gives and error.
    Any help will be greatly appreciated

  • 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.

  • How do I have to define a regular expression to filter out data from file?

    Hi all,
    I need to extract parts of lines of a ASCII file and didn't get it done with my low knowledge of regular expressions
    The file contains hundreds of lines and I am just interested in a few lines, within that lines I just need a part of the data.
    One original line looks like that:
    TP3| |TP_SMD|Nicht in Stueckliste|~TP TP_SMD TESTPUNKT|-|0|87.770|157.950|0|top|c| |other|TP_SMD|TP_SMD_60RF-TP
    Only the bold and underlined information is of interest, I don't need the rest.
    I can open that file, read in each line but then I am struggling to pick out only the lines of interest (starting with TP), taking that TP with its number and the coordinates following later on and then writing these shortened lines to a new text file. So the new line should look like that:
    TP3; 87.770;157.950;0 (It doesn't matter if the separator will be ; or |)
    I thought of using regular expressions - is that the right way or is there a better approach?
    Thanks & regards,
    gedi, using LabVIEW 8.5
    Regards,
    gedi

    Hi max,
    for finding a specific part of a string you can use the "Match Pattern" VI, it is located in the Strings Palette.
    Maybe the Extract Numbers.vi example in the examples browser library can help you.
    What I did to filter out my data of interest is first to sort out only the columns which I want to have -
    then there are still a lot of lines remaining I don't need (this is the thing described above).
    The rest I am going to filter out with a (then easy) regular expression with the "Match Pattern" VI.
    Regards,
    gedi
    Regards,
    gedi

  • I need help renaming a file using regular expressions in Bridge.

    Hi,
    I work at a university, and we are working through files for our Thesis and Dissertations. We have been renaming them to make them more consistent. I am just wondering if there is a regular expression that could help with this process?
    Here is come examples of current file names;
    THESIS 1981 H343G
    Thesis 1981 g996e
    THESIS-1981-A543G
    I don't need to change the actual names of the files. just how they are formatted.
    Proper case on Thesis.
    Hyphens(-) in all white space.
    First letter capital, last letter lowercase on the call no (H343g)
    So the list above should look like;
    Thesis-1981-H343g
    Thesis-1981-G996e
    Thesis-1981-A543g
    I have seen people do some pretty cool things with regular expressions! Any help would be greatly appreciated. Thanks!

    You would be better off using a script to do this as an example as I don't think it would be possible in the Bridge re-name.
    Using ExtendScript Toolkit or a Plain text editor copy the code into either and save it out as Filename.jsx
    This needs to be saved into the correct folder. this is found by going to the preferences in Bridge, selecting Startup Scripts, this will open the folder where the script is to be saved.
    Once this is done close and re-start Bridge.
    To Use: Goto the Tools Menu and select Rename PDFs
    Make sure you test the code with a few copied files into a seperate folder first to make sure it does what you want.
    The script will do all PDF files in the selected folder.
    #target bridge 
    if( BridgeTalk.appName == "bridge" ) { 
    renamePDFs = MenuElement.create("command", "Rename PDFs", "at the end of Tools");
    renamePDFs.onSelect = function () {
    app.document.deselectAll();
    var thumbs = app.document.getSelection("pdf");
    for( var z in thumbs){
    var Name = decodeURI(thumbs[z].spec.name);
    var parts = Name.toLowerCase().replace(/\s/g,'-').match(/(.*)(-)(.*)(-)(.*)(\.pdf)/);
    var NewName = parts[1].replace(/^[a-z]/, function(s){ return s.toUpperCase() });
    NewName += parts[2]+parts[3]+parts[4]+parts[5].toUpperCase().replace(/[A-Z]$/, function(s){ return s.toLowerCase() });
    NewName += parts[6];
    thumbs[z].spec.rename(NewName);

  • Looping through files with Regular expressions ?

    Hi,
    My Question is:
    if i have the following Regular Expression,
    String regrex = "tree\\s\\w{1,4}.+\\s=\\s(.*;)";
    The file in which i am looking for the string has multiple entries, is it
    possible to do another regular expression on the captured group (.*;)
    which is in the original Regular expression ?
    The text that is captured by the RE is of the type "(1,(2,((3,5),4)));" for
    each entry, and different entries in the file have slightly different syntax
    is it possible to loop through the file and first of all check for the presence
    of the original RE in each entry of the file
    and then secondly, check for the presence of another RE on the captured group?
    [ e.g. to check for something like, if the captured group has a 1 followed by a 3
    followed by a 5 followed by a and so on ].
    Thanks Very much for any help, i've been struggling with this for a while!!
    Much appreciated
    The code that i have so far is as follows:
    import java.util.*;
    import java.util.regex.*;
    import java.io.*;
    import java.lang.*;
    import javax.swing.*;
    public class ExpressReg {
    public String Edit;
    public ExpressReg(String editorEx){
    Edit = editorEx; // Edit = JTextArea
    String regrex = "tree\\s\\w{1,4}.+\\s=\\s(.*;)";
    //String regrex1 = "(.*;)";
    Pattern p = Pattern.compile(regrex);
    Matcher m = p.matcher(editorEx); // matcher can have more than one argument!
    boolean result = m.find();
    if(result){                           
    JOptionPane.showMessageDialog(null, "String Present in Editor");
    else if(!result){
    JOptionPane.showMessageDialog(null, "String Not Present In Editor");

    if i have the following Regular Expression,
    String regrex = "tree\\s\\w{1,4}.+\\s=\\s(.*;)";
    The file in which i am looking for the string has multiple entries, is it
    possible to do another regular expression on the captured group (.*;)
    which is in the original Regular expression ?Yes, the capturing group is $1 (the only one) referenced in source code as m.group(1).
    m.group() will return entire matching.
    simply use this way:
    String result = m.group(1);
    // your stuff: could be another validation
    The text that is captured by the RE is of the type "(1,(2,((3,5),4)));" for
    each entry, and different entries in the file have slightly different syntax
    is it possible to loop through the file and first of all check for the presence
    of the original RE in each entry of the file
    and then secondly, check for the presence of another RE on the captured group?Again "Yes", no limits!
    Don't need to create another Matcher, just use m.reset(anotherSourceString)..loop using the same pattern.
    Note: Take care with ".*" because regex nature is "greedy", be more specific, eg.: "\\d" just matches digits (0-9).
    Can you give us some sample of "slight difference" ?

  • Regular expressions: find files with exactly 'n' digits in a row

    Hi there,
    I want to filter files that contain only a fixed number of digits, but not more (at least not in after the digits).
    For example, I have
    01.mp3
    02.mp3
    test10.txt
    test000110101010.txt
    04.flac
    and for n=2 I want to get all files except 'test000110101010.txt'.
    The following is not working, and I'm a total newb regarding regular expressions
    ls -l | grep '^-' | awk '{print $9}' | grep '([0-9]\{2\})[^0-9]\{2\}'
    Thanks for help.
    Regards,
    drm

    Thanks!
    I wrote a python script to scan e.g. a music folder for missing files and needed to extract the file numbers from the files to get the "highest" number.
    You can get it from here: http://pastebin.com/Sg9yDHiw (Python3, expires in 1 month)
    Regards,
    drm
    Edit: found a bug
    Last edited by drm00 (2011-02-04 13:57:43)

  • Extracting text from a file name on export / import (Regular Expressions??)

    I’m not even sure if the publishing service, File Naming, in Lightroom supports Regular Expressions or not?? Basically I’m trying to extract the left portion of the file name ie: everything before the underscore “_”. When I import a file I rename the file to reflect the current Image sequence number and then append the date the photo was taken; a typical file is as follows “05625_2008-01-05.dng” on export I would like the new name to be only the sequence number in this case “05625.jpg”. Ideally I would then like to append the folder name that contains the file… “05625 - FolderName.jpg.
    I don’t want to go down the road of figuring out the correct syntax if regular expressions aren’t supported. Thanks in advance - CES

    Is the imported sequence number captured in meta data somewhere or is their somewhere that all of the available fields and there reference names can be found???
    Unfortunately not anywhere available to the user (but it's still stored in at least some filed I know off).
    By the way, why did you choose to put the suffix at the beginning of the name (1234_2010-08-13.jpg)? The common practice is to leave the suffix at the end. That will ensure the filenames will sort in chronological order by filename and you could have easily used the suffix when exporting files. You wouldn't have this problem now.

  • Parsing a text file using regular expression

    hi all,
    i have a text file which is delimited by a pipe symbol.
    eg.|4| |2| |1| |abcde| 345 |2000|...................
    can anyone help me writing the regular expression for the above case.
    Thanks

    Would splitting the string into tokens help you?
    String s = "|4| |2| |1| |abcde| 345 |2000|";
    String[] token = s.split("\\|");
    int len = token.length;
    for (int i=0; i<len; i++) {
         String t = token.trim();
         if (!t.equals("")) {
              System.out.println(t);

  • ALC-FUT-001-007: Syntax error in the regular expression *. from File Utilities - Find in ES2

    Has anyone encountered the above error when trying to use the Foundation - File Utilities service Find?
    This is occuring in ES2, and I have tried using an asterisk, as well as the exact file name I know exists.
    I have tried literals in the Process Properties, as well as passing it in via string variables.
    Any help is appreciated.
    Thanks
    Mark

    Thanks for your response.
    Here is what we have learned:
    We should not put the regular expression value in single quotes - eliminates the error.
    The problem is, the Find operation always returns an empty list no matter what criteria we enter - even C:\ with criteria = *.*
    ES 2 is running on a Windows 2003 machine.
    Thanks Again
    Mark

  • Finding the file name with Regular Expression

    Hello All,
    I am having some requirment to find the file name for the input provided parameter.
    In my program i am having an input parameter for file name. This contains both the file name and file stored location.
    Example : C:\Dokumente und Einstellungen\xs234fs\Desktop\TEST_123_44.txt
    From the above example string i need to find only the file name that is TEST_123_44.txt by using Regular expression.
    Please let me know how to get this.
    Thank you ver much in advance.
    Thanks,
    Feroz.

    Hello,
    If you have attached an F4 help to the filename input param, in that you can use the FM: GUI_FILE_SAVE_DIALOG.
    In this there is a return param FILENAME which contains the name of the file.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
          CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
           EXPORTING
             window_title            = TEXT-001
             default_extension       = p_extens
             default_file_name       = ls_deffile
             initial_directory       = ls_initdet
           IMPORTING
             filename                = ls_filename "This contains the filemame
             path                    = ls_path
             fullpath                = ls_fullpath
             user_action             = ls_usaction.
    Else if you have hardcoded the filename in the input field you can use rthe FM: PC_SPLIT_COMPLETE_FILENAME to split the filenames into different components
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 6, 2009 9:31 AM

Maybe you are looking for

  • HT1727 I have 2 Apple ID's one from 2008 which is an email account I no longer use. Can I terminate this account and just use the preferred one?

    I have 2 Apple ID's one from at least 5 years ago which I no longer use - last purchase 2008. It is linked to an email account which I no longer use regularly. I established this account on my laptop which I use in the city where I work. The newer ac

  • Trend Micro Titanium 2012 interferes with Firefox

    Recently I had to upgrade from an old version of Trend Micro's anti-virus software to Trend Micro Titanium 2012. Now many Web sites (such as eBay) are not displayed properly in Firefox; the links are just piled up on the left side, and most of the gr

  • SES, TREX ... and search in indexed table

    Hi I have a task, to use SES to create intarface (in ABAP) for search in one specyfic table. This table contains field with long description text and I would like to use SES to search over it. I read some documents and i checked SAP Help ... but i st

  • How to convert window to tabbed page?

    In CS4, when I drag a photo from windows explorer into photoshop, it becomes a tabbed page. If instead I open the same photo via file menu, it becomes a window that when maximized, covers the menu bar, making the menu hard to access. I can convert a

  • Parallax scrolling for different screens

    Hi there... Does anybody know how to deal with different screen sizes and parallax scrolling? It know the 100% width option so that is not the issue.....the issue is the height!! Laptop versus desktop etc.. So what is the best height to use so it wil