split a string using any delimiter and display a table

Hello

I'm trying to split a delimited string and an array of the output results.

I come from a background of .net and c# code I would use would be

Dim myString As String = "mystring\r\nto\r\nsplit";

String [] myString = mystring. Split (newchar [] {'\n', '\r'}, StringSplitOptions.RemoveEmptyEntries);

The code above have a line of muli on the input string (where the \r\n) and the output of a table with the following content

'mystring '.

« à »

'split '.

In addition, I would like to also support comma-delimited files.

I used the string function

"Spreadsheet String To Array" that works well enough for the lines of delimited by commas, but not when the delimiter is something funky like '\r\n '.

vi.llb in the advanced channel folder there are some goodies that do not surrender to the Kroatiens

Tags: NI Software

Similar Questions

  • Split a string using regexp_substr with consecutive delimiter

    I split a string with tubes as a delimiter. A string like this for example:

    "THIS |" EAST | ONE | EXAMPLE '

    If I do something like this:

    SELECT REGEXP_SUBSTR('THIS|IS|AN|EXAMPLE', '[^|]+', 1, 4) FROM DUAL
    

    I would get the word EXAMPLE

    But if the string is like this:

    "THIS |" EAST | ONE | EXAMPLE '

    With the above query, I always get EXAMPLE, but the word should be in the next position (5) because after IS, there should be an empty element

    Is it possible to change the regular expression to also get the empty element?

    Thanks in advance

    Well, the way I understand it, you get this behavior, because there is 'nothing' between the delimiters. so there is a field, so it does not display it don't think the regular expression.

    Try it with a space between the delimiters - works fine.

    So, with this in mind, the simplest solution might be something like that?

    regexp_substr (replace(c,'||','| |'), "[^ |]") +' 1, 4)

    [edited to avoid having a partial answer marked "correct"]

    As mentioned below by a few others, there are other solutions using regular expressions.

    The solution above does not work if more than 2 consecutive fields are empty, or if the first or last is empty.

    A simple tweak to the logic would help with this:

    RTrim (regexp_substr (replace (c,'|))) ',' |'), ' [^ |] +', 1, level))

    However, even if it has still some limitations compared to the solution of the full regular expression mentioned by Frank, below.

    [/ Edit]

  • Hide and display a table made by programming based on the State

    Hi all

    I have two tables in my page. I have a requirement to hide and show a table advanced programmatically based on a condition.

    I used the following statement to hide and show the edge table. But still the table appears on my page.

    If (TblBn! = null)

    {

    TblBn.setRendered (true);

    }

    If (TbBn! = null)

    {

    TbBn.setRendered (false);

    }

    Anyone has any idea on this?

    Yes, you could do this using SPELLS.

    Create a VO model with 2 attributes say "RenderTable1" and "RenderTable2" of type Boolean.

    Set the corresponding attributes in the attribute of the AdvancedTable.

    Write methods in AM below.

    public void createPVORow()
         {
              OAViewObjectImpl dummyPVO  = (OAViewObjectImpl)getXXDummyPVO1();
              if(dummyPVO != null)
              {
                   if(dummyPVO.getRowCount() == 0 )
                   {
                        Row dummyPVORow =  dummyPVO.createRow();
                        if(dummyPVORow != null)
                        {
                             dummyPVORow.setNewRowState(Row.STATUS_INITIALIZED);          
    
                             dummyPVORow.insertRow(dummyPVORowRow);
                        }
                   }
              }
         }
    
    public void setDummyPVOValues(String[] name,String[] val)
    {
       OAViewObject dummyPVO  = (OAViewObject)getXXDummyPVO1();
       if(dummyPVO != null )
       {
        dummyPVO.setRangeSize(-1);
        Row row = dummyPVO.getRowAtRangeIndex(0);
        if(row != null)
        {
      for(int i = 0; i < name.length; i ++)
      {
      if("Y".equals(val[i]))
      {
       row.setAttribute(name[i],Boolean.TRUE);
      }
      else
      {
       row.setAttribute(name[i],Boolean.FALSE);
      }
      }
        }
       }
    }
    

    Call the two methods in the PR with appropirate parameters.

    Call the second method with parameters of the useful, likely only in the PFR State-based.

    It will be useful.

    See you soon

    AJ

  • Using the procedure to display the table of multiple data

    Hi, I need help for the procedure in oracle

    I want to create the procedure to display the table of multiples with sample plan

    with a parameter imployee_id to display an employee_id, name, function, start_date, end_date

    IAM using this query to select more than one table

    SELECT e.employee_id, e.first_name, j.job_title, h.start_date, h.end_date

    E EMPLOYEES

    JOIN j jobs

    ON j.job_id = e.job_id

    JOIN the job_history:

    ON h.employee_id = e.employee_id

    WHERE e.employee_id = 200;

    Thanks for the help

    Blu and Billy showed you the 'real' solution. You can display the data returned by a cursor ref in SQL Developer, too:

    http://www.thatjeffsmith.com/archive/2011/12/SQL-Developer-tip-viewing-refcursor-output/

    Yet as a duty for a beginner is generally do not have the expected solution. Usually, teachers want to see you using a LOOP and dbms_output. something like

    DECLARE

    Xy CURSOR IS

    SELECT whatever

    As much as;

    BEGIN

    FOR r IN xy LOOP

    dbms_output.put_line (r.col1 |' # ' | r.col2);

    END LOOP;

    END;

    Of course this suggestion will inaugurate a discussion abusing DBMS output but I keep my position that it is authorized to use it for learning the basics.

  • Windows crashes when you use any application and stops in hibernation mode

    Hello people who might be able to help me,

    I come back from summer vacation and turned on my computer with windows 7 at first all seemed fine until I wanted to open an application. Opening was always very well, but when I did something on this subject, it crashed. Also my PC then stops in the hibernation mode. I can access internet, but nothing else. Then I tried to recover my PC. It turns out I have no recovery points and can only restore factory mode that sucks. Now that was new, since always, before I could restore my PC to a previous session without making any restore points. What can I do to restore my PC and ban these errors?

    Hello Nicolas,.

    Thanks for posting your question on the Microsoft community.

    I would like to know some information about the problem so that we can help you better.

    1 did you receive no error message or code when the application or the system crashed?
    2. What is the brand and model of your computer?

    Thank you for details on the question and your efforts to resolve.

    This problem can occur because settings to corrupt, or because of the presence of unused files in Windows. This can also occur due to the presence of any virus or malware.

    I appreciate the fact that you want to restore your computer. However, until you do, I suggest you to try the following methods and check if it helps.

    Method 1:
    Resolution of performance problems and check.
    Reference:
    Open the troubleshooter of Performance
    http://Windows.Microsoft.com/en-us/Windows7/open-the-performance-Troubleshooter

    Please also run convenience store power.
    Reference:
    Open the troubleshooter of power
    http://Windows.Microsoft.com/en-us/Windows7/open-the-power-Troubleshooter

    If this does not help, use method 2.

    Method 2:
    Microsoft safety scanner run and check the issue.
    Reference:
    Microsoft safety scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • BPEL scenario 1 (Using concat function and display)

    Hello

    I am completely new to the BPEL space and I try to run the scenario 1, which is the source text with the print output and input values to concat.

    I installed the software mentioned in the link - https://java.net/projects/oraclesoasuite11g/pages/Home (please let me know if something's not working)

    The issue that I am facing is when I am trying to deploy the project, I get 'IntegratedWeblogicServer' option in 'application server' (Assistant), who in turn does not 'SOAServers', so I'm not able to complete the wizard.

    I saw message saying "connection should be put in place, with the application server and integrated server", how?

    In addition, please let me know how get you to the page of the admin, where the input text will be filled in and is at - it a particular sequence in which servers (process of Oracle BPEL manager/Oracle DB / Oracle service bus/Web logical server /). I hope I have all components, but I am not able to configure them properly.

    Could someone help me on this.

    Kind regards

    Alexander

    Hello

    Have after installing the binary files you created your own weblogic domain name?

    A useful guide on how to install and configure the entire package:

    - http://www.oracle.com/technetwork/middleware/soasuite/overview/quickstartguidesoasuite11gr1ps4-459545.pdf

    Flat products referenced in this guide, it must be valid.

    Kind regards

    Mathieu

  • How to use FTP Client and manage the table in BB with JDE

    I'm a newbie to BB development. I have an application in mind, it is a simple ordering application. BB users can send order information to an ftp server. The BB will have some paintings as a customer table and the Order Details table (the two have only a few records). Since cannot use the Services of SDM BlackBerry because the license fees. I'll use JDE to develop the application.  Here are my questions:

    1. What is the best way to manage the tables (read/write)?  RMS, or embedded database (which one?)
    2. is there any ftp client in JDE, api can be used to send data to an ftp server?

    Thanks for help.
    PJ

    The exact figures for RMS sizes are available in this article:

    What is - size restrictions when you use the RecordStore
    Article number: DB-00656
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800724/What_Is...

    So that your information is correct, in 4.6 or later, the per application limit went up to 512 KB.  I don't know if there is a limit on a single record in a record store. We must be careful of the terminology here, it's RecordStore or RMS - is not in BlackBerry terms anyway, PersistentStore (see next).

    The BlackBerry offers two other ways to store data.

    The first and most commonly used are called PersistentStore, and it is an a storage mechanism for objects, I am not aware of any restrictions, other than the memory of the device, about the size of an object that can be stored in PersistentStore.  The advantage with PersistentStore, is that you just persist an object helps you, rather than having to convert it to bytes (serialize) before storing and converting new (him deserialize) after reading it back.

    The second way is to write data using the FileConnection API, and you can for example use this to write data to the SD card in the device.

    EFF and PersistentStore use the flash memory in the device.  You don't have to manage yourself.  You treat all that identical objects, the BlackBerry operating system very cleverly manages to bring your items in RAM and save them in Flash, so you don't have to worry about the type of storage you have.

    I hope this helps.

  • Chain of Split which begins with a delimiter

    Hi all
    I am trying to split a string using "-" as a separator and store values (strings) in a list. The problem is that, because the string begins with the delimiter, I get an empty (as my first item) element in my list. I would appreciate your help to solve this problem.

    My code is:
    public class SplitString { 
       public static void main(String[] args) {
         String str = "-Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy" +
                      "-Djava.awt.headless=true -Dhttp.webdir.enable=false";
              
              SplitAndStoreAsList(str);
         }
         
        public static void SplitAndStoreAsList(String str){
         List<String> list = Arrays.asList(str.split("-"));
              
         for (int i = 0; i<list.size(); i++){
                 System.out.println(i + ": " + "-" + list.get(i));
         }
              
        }
    }
    The output should be
    0: -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy
    1: -Djava.awt.headless=true 
    2: -Dhttp.webdir.enable=false
    But it is
    0: -
    1: -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy
    2: -Djava.awt.headless=true 
    3: -Dhttp.webdir.enable=false

    Why not just change the regular expression that is

         List list = Arrays.asList(str.split("(?
    
  • Hi there, I been using MacBook Air and IPad2 for awhile. Recently, I lost my MacBook Air and am interested open ICloud to check my folder/old records. Can I get directions to the opportunity to see my files in I have the cloud.

    Hi there, I been using MacBook Air and IPad2 for awhile. Recently, I lost my MacBook Air and am interested open ICloud to check my folder/old records. Can I get directions to the opportunity to see my files in I have the cloud.

    I hope that you are not in a surprise but a MacBook Air not backup to iCloud. It can record data in iCloud drive (if you saved it specifically to this place) and can synchronize Photos, Contacts, etc to iCloud if you had set it to do. You can use any computer and connect to https://www.icloud.com/ to see what is stored. I hope this is good news and that it contains what you hope.

  • How to split a string into several substrings parent using a delimiter

    Hello

    I am forced to split a string into several substrings parent using a delimiter.

    And insert these substrings in variuou of the columns of a table in a row.

    For example. The sting is: ABC * DEF * GHI * JKH *.

    where ' *' is the separator.

    Desired output:

    Col1 Col2 Col3 Col4 Col5

    -------     --------     --------     -------     ---------

    JKH GHI ABC DEF (null)

    Could you please guide me how can I achieve this.

    Thank you

    Bogoss

    Hello Salim,

    Leave the thread for reference... got this excerpt:

    with t as

    (

    Select "c: its: hgfd:1:23" Str

    )

    Select

    REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 1, null, 1) col1

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 2, null, 1) col2

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 3, null, 1) col3

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 4, null, 1) col4

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 5, null, 1) col5

    t;

    This code snippet works well, but for the fixed columns. Here are 5 predefined columns.

    But I need to have a logic that I can browse the string any No.. sometimes.

    For example. If I get 3 secondary channels of the parent chain... I need to insert into 3 columns.

    And if I get 6 strings under... I need to insert into 6 columns.

    Could you please help me develop a logic like that.

    I use Oracle database 10g.

    And the data are currently being collected on external table... but I can store in a variable or a column of a database table.

    Thank you

    Bogoss

  • Use the listbox control to select several channels and display on the chart

    Hello everyone!

    I have a problem using the ListBox selection mode 1 or mode items. I have 6 channels of data, and I have a 2D chart. I am able to reterieve the signal names in the list box, but I want to be able to choose one or more signals to display on the chart. I used the table to index my 2D data are connected and then the output of the index table is connected to the graph. I had to use the listbox control as an index for the table to index and display the data in the index selected for display on the chart. I used lisbox as the value property nodes, the line active and all but not able to display signals on the graph. I have attached a code example to show you what exactly I'm looking.

    Any suggestions will help a lot.


  • I tried to burn some pictures with music on a DVD using Windows DVD maker, but others cannot open or run the disc. I tried to use DVD-R and DVD + R, but nothing works. Any suggestions?

    I have created a slideshow with background music using Windows DVD maker on a DVD-R and DVD + R and others cannot open or run the disc. I can't run into a DVD player, but my computer it plays very well. Any suggestions?

    Lol it won't play in my DVD player either. Just the computer.

    =====================================
    This could be a hardware problem with your DVD writer
    but here's something you can try.

    Create your slideshow (photos and music) in the film
    Creator of... and then publish the file to a folder on your hard drive
    walk in the .wmv format.

    Windows Vista
    Getting started
    Windows Movie Maker
    http://Windows.Microsoft.com/en-us/Windows-Vista/getting-started-with-Windows-Movie-Maker

    Windows Vista-
    Publish a movie in
    Windows Movie Maker
    http://Windows.Microsoft.com/en-us/Windows-Vista/publish-a-movie-in-Windows-Movie-Maker

    Then try to use the following free software to burn your DVD:

    (FWIW) It's always a good idea to create a system
    Restore point before installing software or updates)

    DVD Flick
    http://www.dvdflick.NET/

    Be sure to read the Guide:
    http://www.dvdflick.NET/Guide.php

    If you have problems to download DVD Flick...
    Try the following direct link:
    http://tinyurl.com/yzx9sck
    or...
    http://downloads.sourceforge.NET/project/dvdflick/dvdflick/DVD%20Flick%201.3.0.7/dvdflick_setup_1.3.0.7.exe?use_mirror=SoftLayer

    Save the file to a folder on your hard drive and
    install from there.

    Tutorials:

    Tutorial DVD Flick
    http://beginwithsoftware.com/videoguides/DVD-flick-Guide.html

    Burn any Format video DVD PC
    http://www.freevideoworkshop.com/dvdflicktutorial.htm

    To create a video DVD base that should play in a free
    permanent drive DVD... try the following...

    Good luck.

    First... read the DVD Flick Guide to familiarize
    with the program.

    Open DVD Flick and insert a blank DVD in your drive.

    If the window of Autorun from your computer... just close it.

    Click the project settings button and check... Video /.
    Target format... residents United States... Choose... NTSC /.
    Accept.

    The title button left click Add and navigate to your
    Video clips and select the ones you want on the DVD.

    You can have by selecting one and then use
    the up and down buttons.

    Left click on the button create DVD / OK / Yes / Yes.

    Please wait while the DVD is created.

    When the text "Completed successfully" is displayed you
    DVD Flick can close. Now you can eject your DVD
    and play in your DVD player.

    At some point you might want to buy more
    Advanced Cyberlink, Nero, Roxio, software
    Ulead, etc... but at least it is a start.

    Good luck.

    John Inzer - MS - MVP - digital media experience

  • Problem ejecting USB Mass Storage Device "this device is currently in use. Close any programs or windows that might be using the device, and then try again. »

    Original title: problem ejecting USB Mass Storage Device

    When I try to eject safely my external hard drive safely I get an error with this title message telling me that "this device is currently in use. Close any programs or windows that might be using the device, and then try again. "I did it. I also tried to close all programs running on the computer and it does not help. I also tried to restart the computer, and it also does nothing. If anyone has any ideas that might be useful please let me know.

    Hi a. Cook,

    (1) how long have you been faced with this problem?

    (2) is limited to any specific USB device?

    This problem may occur if there are handles open with all the files in the USB (Universal Serial Bus) mass storage device are in use by another program.

    Method 1:

    (a) Download Process Explorer from the link below

    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653

    (b) click on search, find handle or DLL (Dynamic Link Library) in the tool menu.

    (c) type the drive letter of the USB device in the handle or DLL substring text box and press the search button.

    (d) find the process and its PID (process identifier) in the following box.

    (e) with a view to the processes of the system tree, look for the process according to the dialog box find handle or DLL.

    (f) press Ctrl + H to display the handles in the view in the lower pane.

    (g) find the file according to the drive letter and right click, choose Manage close.

    Reference:


    Problem ejecting USB mass storage device
    http://support.Microsoft.com/kb/555665

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Method 2: You can see the steps in the link below by Diana d.
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-hardware/problem-ejecting-USB-mass-storage-deviceits-in-use/fd56805c-ED8E-491F-8a2b-39ed1c988a71

    Method 3: A scanner online for any threat and try to correct

    http://OneCare.live.com/site/en-us/Center/cleanup.htm

  • In any case to stop WMP using identification tags and simply use file names?

    I do not use DVD or CD more - for the most part, torn from my PC and streaming via WMP on my PS3/TV

    Only problem I have, is that I used the folder & file naming to organize all my media
    in fact I only use the view file on WMP
    but uses WMP ID tags where date and/or filename if not - that seems messy
    In any case to stop WMP using identification tags and simply use file names?
    Or at least WMP can be used to remove unwanted tags - mainly video?
    I tried to remove them one at a time that "seems" to work until I have re-catalog and tags miraculously reappear?

    Tri-pour those who have the same problem - I used Windows to remove the ID tags

    Open the window containing the media files > search * to reveal all the files (save you open folders one at a time)
    Folder view > Details
    Right-click on the column details bar / > more >
    Add the 'title' column (this will display the titles (tags) > OK)
    Sort by title window will consolidate all the videos that have set the title/tags
    Select all video files with titles
    Right click > properties > Details >
    Choose "Remove properties and personal information" > OK
    Choose "remove after this file properties.
    Check "Title" (multiple values) - careful not to tick/delete other important tags
    Ok
    Take a few minutes depending on the number of files
    Sorted
    WMP shows now all my media by filename
  • Concatenate and split the string

    Hi all

    Is there some how we can split the string like this "1 | ~ | Diego | Maradona | ~ | Footballer | The Argentina.

    in the table of 3 elements: '1', ' Diego | Maradona', ' football '. The Argentina.

    Here is my code
    public static void main(String args[]){
              System.out.println("========USE SPLIT========== " );
                   String data = "1 |~| Diego|Maradona |~| Footballer|Argentina";
                 String[] items = data.split(" |~| ");
                 for (String item : items)
                 {
                      System.out.println("item = " + item);
                 }
                 StringTokenizer tok = new StringTokenizer(data," |~| ");
                 System.out.println("========USE TOKENIZER========== " );
                 while(tok.hasMoreElements()){
                      System.out.println("item = " + tok.nextToken());
                 }
              
         }
    and put it is:
    = USE SPLIT =.
    Item = 1
    Item = |
    Item = |
    Item = Diego | Maradona
    Item = |
    Item = |
    Item = football | Argentina
    = USE TOKENIZE =.
    Item = 1
    Item = Diego
    Item = Maradona
    Item = footballer
    Item = Argentina

    Published by: mycoffee on February 1, 2011 06:49

    Split() takes a regular expression. ' | ' has a special meaning in regular expressions.

    Try to use

    " \\|~\\| "
    

    as the argument of split()

Maybe you are looking for

  • IdeaPad Yoga 13 + 0A 33970 ThinkPad USB 3.0 Dock Station + Windows 10 = no video output?

    All connected to the dock station seems to work fine except for the video output, which does not appear. Used to work fine under Win 8.1 but decided to move to Win10 yesterday... ugh. I tried to update on the latest software/drivers from DisplayLink

  • Ty basket

    When I right click the icon of recycling on the tool locker superior bar emty the trash is not lite up active it. He is used to but is no longer the dose. I use vista home preimium

  • How to open my hp vectra vl800

    Hello I tried to open my hp Vectra, but it does not open... So I was wondering if anyone knows how to do it Randhir279

  • Ripple emulator extension

    I take the summer to try to try my self-taught hands at webworks for BB10 using BBUI. ISM I'm having a problem getting ripple to run. I can't get the services of ripple run through the commnd line. Research in Motion\Ripple in C:\Program \services\bi

  • Classic Windows 7 start menu?

    It is possible to set the start menu in Windows 7, XP or Vista classic? I like most recent menu, I prefer the classic because I have a better overview that I installed. Thank you