Other code to 'next line', without using /n

I have a stream of words, which means all the words are join together without any space in between it. I have over 10000 chracters in this stream, which is a lot. Showing part of my stream from a text file.
(e.g. ADDNEWORGANISATIONUNIT|1910514527ADDOUJSPstarts|-1360880213ORGANISATIONUNITOU|714150200 )
I trying to write a code to extract this text file, and then seperate each part with a 'next line' function. Meaning I want the above example to become this:
ADDNEWORGANISATIONUNIT|1910514527
ADDOUJSPstarts|1360880213
ORGANISATIONUNITOU|714150200
Each line comprises of alphabet|number
I failed to code out such program, and needs help!!

In this case the new lines are required between the chars and numbers, there is no delimiter to tokenize with
Try
public class Test {
    public static void main(String args[]) {
        String s = "ADDNEWORGANISATIONUNIT|1910514527ADDOUJSPstarts|-1360880213ORGANISATIONUNITOU|714150200";
        StringBuffer work = new StringBuffer();
        boolean b = true;
        for(int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(Character.isLetter(c)) {
                if(!b) {
                    System.out.print(work+"\n");
                    work = new StringBuffer();
                b = true;
            } else {
                b = false;
            work.append(c);
        System.out.print(work+"\n");
} Steve.

Similar Messages

  • When I am editing information is there a keyboard shortcut to advance to the next song without using the mouse to click "next"?

    When I am editing information is there a keyboard shortcut to advance to the next song without using the mouse to click "next"?

    Thank you so much. I've been trying to find a way to do this for a long time!
    Paul

  • How can i telnet or get access to other LAN members in LAN without using third party software?

    I have admin access to the main  router in our LAN, so how can i telnet or get access to other LAN  members in LAN without using third party software?
    its linksys3500 router and  i login as admin using the gateway address in address bar..
    i  want to access the c drive of my colleague in same subnet in same  office and i know his ip address.but he not configured telnet accept  request.so without it how can i open his telnet port and access him

    I think you are using the wrong terminology. You can browse the hidden share of any pc if you know the ip and have a valid user account on the pc by typing in the following \\computername\c$ or \\ipaddress\c$ . It should prompt you for a user account. You may have to allow this through the windows firewall (or disable it completely).

  • I have admin access to the main router in our LAN, so how can i telnet or get access to other LAN members in LAN without using third party software?

    I have admin access to the main router in our LAN, so how can i telnet or get access to other LAN members in LAN without using third party software?
    its linksys3500 router and  i login as admin using the gateway address in address bar..
    i want to access the c drive of my colleague in same subnet in same office and i know his ip address.but he not configured telnet accept request.so without it how can i open his telnet port and access him

    Duplicate post. 

  • HT204088 Why can't you print a cd jewel case listing of songs using iTunes. Is there some other way of doing this without using iTunes?

    Why can't you print a cd jewel case listing of songs using iTunes. Is there some other way to do this without using iTunes?

    Hi spider1950,
    As long as you have the most recent update of iTunes (11.0.4), you should be able to print a jewel case insert directly from iTunes. You may find the following page useful:
    Apple Support: Print CD Inserts
    https://www.apple.com/findouthow/music/itunes.html#makecd-printinserts
    Regards,
    - Brenden

  • How do i share pictures with other users on my Mac without using iCloud or photo stream

    How do I share pictures woth other users on my Mac without using iCloud or photo streaming?

    Simplest way is probably to put copies into the Users/Shared folder.

  • How to minify code in DW CS6 without using third party tools?

    I work in a secure environment without access to the internet or third party plugins. We just have access to Dreamweaver CS6 and I am looking for ways to minify (remove all the white space) in my code (CSS, JS, HTML, etc). I did see a tutorial about simply selecting white space in the code and then doing a FIND AND REPLACE and clicking the "REPLACE ALL" button to remove the white space, but that did not work on my system.
    Does anyone have any solutions? I am open to copying and pasting the code in something like notepad if there's a way to remove the whitespace that way, I could also possibly copy a php script to my system, but that will take some time to get cleared by the IT folks.
    Thanks!

    Use Edit > Preferences > Code Format > Tag Libraries to set up how you want your code to appear.   Then use Command > Apply Source Formatting.  It won't minify your code to the extent that other on-line minification tools will, but it might help a little.
    Removing all white spaces from scripts can cause them to fail so I don't think doing a global Find & Replace is what you want.
    Nancy O.

  • How to create a line without using execute action method.

    Hi All,
    I want to create a line whose weight and co-ordinate are given to me. I am using ActionDescriptor and execute action method to do this.
    Here is my code:
        var idcontentLayer = stringIDToTypeID( "contentLayer" );
        var idStrt = charIDToTypeID( "Strt" );
        var idHrzn = charIDToTypeID( "Hrzn" );
        var idPxl = charIDToTypeID( "#Pxl" );
        var idVrtc = charIDToTypeID( "Vrtc" );
        var idPnt = charIDToTypeID( "Pnt " );
        var actRef = new ActionReference();
        actRef.putClass( idcontentLayer );
        var layerDesc = new ActionDescriptor();
        layerDesc.putReference( charIDToTypeID( "null" ), actRef );
        var lineDesc = new ActionDescriptor();
        lineDesc.putClass( charIDToTypeID( "Type" ), stringIDToTypeID( "solidColorLayer" ) );
        var propertyDesc = new ActionDescriptor();
        var strtPointDesc = new ActionDescriptor();
        strtPointDesc.putUnitDouble( idHrzn, idPxl,  startX);                         //startX, startY, endX, endY are given..
        strtPointDesc.putUnitDouble( idVrtc, idPxl, startY);
        var endPointDesc = new ActionDescriptor();
        endPointDesc.putUnitDouble( idHrzn, idPxl, endX );
        endPointDesc.putUnitDouble( idVrtc, idPxl, endY );
        propertyDesc.putObject(  charIDToTypeID( "Strt" ), idPnt, strtPointDesc );
        propertyDesc.putObject( charIDToTypeID( "End " ), idPnt, endPointDesc);
        propertyDesc.putUnitDouble( charIDToTypeID( "Wdth" ), idPxl, weight );               // weight is given.
        lineDesc.putObject( charIDToTypeID( "Shp " ), charIDToTypeID( "Ln  " ), propertyDesc );
        layerDesc.putObject( charIDToTypeID( "Usng" ), idcontentLayer, lineDesc );
        executeAction( charIDToTypeID( "Mk  " ), layerDesc, DialogModes.NO );
    Is there any other way to do the above (using photoshop scripting method)?
    Thanks,
    AI

    You can only create normal and text layers using the Object Model. For other layer types you have to use Action Manager.

  • HT3702 is there any other way tu purchased app without using credit card or paypal??

    Hi Guys,
    Does someone knows how to purchased apps without using credit card or paypall? is it available?

    iTunes gift card?

  • Add Reason codes to the line items using FBL5N

    Hi
    I am trying to assign the reason codes to the customer incoming payments using mass change functionality in FBL5N.But error ' unable to change every  document ' appearing
    Please reply ASAP
    Regards
    Akbar

    Hi,
    if you have tried to change some of those documents manually and you didn't find a reason why it is not changing I recommend to change via LSMW or CATT on transaction FB02.
    I am sure you have this field open and changeable in all of your documents.
    You would need to have only fwe fields in it...
    Regards
    Hein

  • How to code for DSynamci Selections without using a logical database?

    In a custom program, how to generate dynamic selections without specifying a LDB int he attributes.
    Thanks,
    Ven

    This does not relate to the dynamic selections I am looking at.
    If you look at FBL3N or FBL1N, there will be a Dynamic Selections button which gets in as part of the LDB associated with it.
    I want to know if there is a simpler way of putting this in a custom program without reference to the LDB.
    Thanks,
    Ven

  • How to make code in dreamweaver flow to the next line?

    The line lengths of my code are really really long. How do I make it automatically flow to the next line without causing it to actually be a new line? Just for viewing purposes. I don't like having to scroll all the way to the end of the line of code to add a close tag.

    Hi
    Right-click on the area next to the 'box' that has the page title, and select 'coding' to enable the coding toolbar, (appears on the l/h side of the code window) then select the word wrap icon, see image -
    PZ

  • Publish a plsql code as webservice without using JDEVELOPER or APEX

    Hi All,
    I am looking into how can we publish a PLSQL code as web-service without using JDEV OR APEX.
    When I google for this one I can see only by using JDEV or APEX we can publish Code as a web-service.
    Is there any way in oracle, just by using simple PLSQL packages we can publish code as a webservice.
    Appreciate your response.
    Thanks,
    MK.

    Apex does not publish PL/SQL code as web services. It is a web run-time and development framework. Something totally different.
    To turn a PL/SQL function into a web service is simple. You use the orawsv servlet in XDB - without making a single code change to the function. It will not even know it is called as a web service.
    To use orawsv, two basic steps. Configure and enable the servlet (raw HTTP/HTTPS connections will be handled by the Listener). This also entails enabling shared server in the database, if not already enabled. The 2nd step is to allow the function to be executed (via a HTTP call) as a web service, via granting specific roles.
    orawsv handles the HTTP call. It provides the WSDL. It parses SOAP envelopes as input. It makes the call (as a standard PL/SQL call), to the function being used as a web service. It returns the results of the PL/SQL function call, as a SOAP envelope output.
    See Support Notes:
    How to Setup Native Oracle XML DB Web Services [Article ID 444191.1]
    Sample Framework for testing Native Oracle XML DB Web Services [Article ID 803794.1]
    How to Browse Native Oracle XML DB Web Services Example [Article ID 1324235.1]

  • Command Line sqlplus without using @filename

    How can I pass sql statement directly to sqlplus on command line without using an external file ?

    If the insert happens infrequently, then the cost of writing
    to a temporary file may not matter overall. And if the
    insert happens frequently, the cost of invoking SQL*Plus and
    connecting to the DB could outweigh the time for writing to
    a file.
    Do you have any problem doing something like:
    tail -f mylog.txt | myawkprog | sqlplus -s scott/tiger
    Here I'm thinking that 'myawkprog' prints appropriate INSERT
    and COMMIT statements.
    For what it is worth, I have an old, old Perl 4 script for a
    similar log parsing task. It keeps the SQL*Plus connection
    alive forever and makes sure there is no I/O buffering. The
    outline of it is below. Use at own risk.
    -- CJ
    #! /usr/local/bin/perl -w
    # Open I/O pipes
    open(LG, "tail -f /tmp/mylog.txt|") || die "Can't open input";
    open(SP, "| sqlplus -s scott/tiger") || die "Can't open sqlplus";
    # unbuffered I/O
    select(LG); $| = 1;
    select(SP); $| = 1;
    while(<LG>)
    chop;
    print SP "insert into mytab values ('$_');\n";
    print SP "commit;\n";
    # Never actually get here
    close(LG);
    close(SP);

  • Get table cell value on click without using submit or action

    hello ,
    i am having html table containing values retrieved from database.
    i want to create table cell as a link and want to pass cell's value to the next page without using submit, radio button, checkbox.
    it is feasible in PHP and ASP but i want to solve in jsp. pls suggest the solution.
    Edited by: Avinash123 on Dec 16, 2008 2:58 AM

    Here is sample code
    <script type="text/javascript">
    function callForm(data)
    frm.action="anotherjsp.jsp?value="+data;
    frm.submit();
    </script>
    <form name="frm" action="">
    <table id="test" border='1'>
    <tr >
    <td onclick="callForm('Data1')" > Data1 </td>
    <td onclick="callForm('Data2')" > Data2 </td>
    <td onclick="callForm('Data3')" > Data3 </td>
    <td onclick="callForm('Data4')" > Data4 </td>
    </tr>
    </table>
    </form>

Maybe you are looking for

  • After upgrading to Imac updating Iphone and Ipad I can no longer sync in Itunes

    I have newly upgraded to IMac and love it! I also traded in my IPad to IPad Air and updated my IPhone from 4S to 5C. When I was using a Windows PC I had all my gadgets synced to ITunes (this includes a MacBook Pro and two IPods, Yes I'm hooked). Now

  • Determine version used to create a report at runtime?

    Is there a way to determine what version of Crystal was used to create a report during runtime?  I've looked at the objects and cannot find a property that might be used.  There is a File Forrmat Schema property in the Report Definition item in the P

  • Setting up accounts in Mail?

    Has anyone set up their gmail account in mail? If so what should go in the incoming mail server field and outgoing mail server (STMP) field?

  • Use of JTAPI in Caller ID

    Hello all, I'm doing a Computer Science degree, and my topic for this semester's programing project is Caller ID Management. I'm supposed to implement a call-logging software in Java, and JTAPI seems like a ready solution, but the problem is, I'm not

  • "in update task" and "strings"

    Hi guys, I tried to extend a table by a string. this table is updated via a function module (Verbuchungsbaustein = in update task). The new rows are submited via the tables option. But this leads to a dump, could it be that it is not possible to use