"abcd"-- "a","b","c","d" or "12345"-- "1","2","3"......

hi,guys,
here is a problem :
String temp = "abcd"; or String temp = "1235";
how can i get the result as String[] {a,b,c,d} or {1,2,3,5}?
needed a good way..
thanks

codingMonkey wrote:
sabre150 wrote:
       String temp = "abcd";
String[] split = temp.split("(?<!^)");
I'm curious... Why the big regex? Wouldn't this do the exact same thing?
String temp = "abcd";
String[] tempArr = temp.split("");
No. Your way you get an empty string element at the start of the result. You need to specify the the split should be made for a gap that is not at the start of the line.

Similar Messages

  • Which functions return an array?

    Name
    Month
    Item
    Joe
    January
    abcde
    Joe
    February
    fghij
    Bob
    January
    12345
    Bob
    February
    67890
    How can I find "abcde" using a search for Joe and for January and then "12345" using a search for Bob and January?

    All the table searches work on only a single dimension. You may need to modify the table to allow for these compound searches.  Insert a column between Month and Item that concatenates the two search terms. Assuming Name is column A and Joe first shows up in row 2 the column formula is "=A2&B2"  this would put "JoeJanuary" into the first row of the new column.  Then you can use VLookup to search for "JoeJanuary" or "BobJanuary" and return the item column.
    To keep the table neat you could hide the new column and still use it in the VLOOKUP formula.  You could also make a specialized table to perform the lookup that contained two cells, one for Name and one for Month.  The table could concatenate these two cells (using the & operator) and enter the composite search word into the first argument of the VLOOKUP command.

  • AAC/MPEG-4 support patch for abcde

    I got bored to day and made up this patch for abcde that adds support for AAC using the M4A extension.
    It uses FAAC as the encoder and also patches abcde to version 2.2.3
    I have not tested it yet so bear with me...i'll post my test results later.
    You'll have to manually add the "M4AENCOPTS=" variable to the config
    usage is: abcde -o m4a
    UPDATED: fixed a plethora of typos
    another side note is the fact FAAC must be compiled with mpeg-4 support, the Archlinux package for FAAC isn't, so therefore this could be a problem unless you compile FAAC yourself. I submitted a feature request to get mp4 support added.
    the following is the 2.2.0 to 2.2.3 update+AAC patch. I will submit a AAC patch for the newest release to the developers of abcde later on.
    --- abcde-old-2.2.0 2005-03-08 12:42:14.000000000 -0500
    +++ abcde2 2005-03-08 12:11:07.000000000 -0500
    @@ -11,7 +11,7 @@
    # Copyright for this work is to expire January 1, 2010, after which it
    # shall be public domain.
    -VERSION="2.2.0"
    +VERSION="2.2.3"
    usage ()
    @@ -21,7 +21,7 @@
    echo "-1 Encode the whole CD in a single file"
    echo "-a <action1[,action2]...>"
    echo " Actions to perform (cddb,read,normalize,encode,tag,move,playlist,clean)"
    -echo "-A Experimental actions (retag, transcode)"
    +#echo "-A Experimental actions (retag, transcode)"
    echo "-b Batch mode: enable album normalization and nogap encoding"
    echo "-c <file>"
    echo " Specify a configuration file (overrides system and user config files)"
    @@ -366,6 +366,9 @@
    mpc)
    run_command tagtrack-$1 true
    + m4a)
    + run_command tagtrack-$1 true
    + ;;
    esac
    done
    @@ -489,6 +492,10 @@
    ## FIXME ## to the encoder ends up empty.
    run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $MPPENCODER $MPPENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" "$IN" "$OUT"
    + m4a)
    + # AAC/MPEG-4 format (.m4a) is done locally, with inline tagging.
    + run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $M4AENCODER $M4AENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" -w "$IN" -o "$OUT"
    + ;;
    esac
    done
    # Only remove .wav if the encoding succeeded
    @@ -737,6 +744,9 @@
    if [ "$INTERACTIVE" = "y" ]; then
    while [ "$DONE" != "y" ]; do
    read ERASEPLAYLIST
    + if [ "$ERASEPLAYLIST" = "" ]; then
    + ERASEPLAYLIST=e
    + fi
    case $ERASEPLAYLIST in
    e|E|a|A|k|K) DONE=y ;;
    @@ -764,7 +774,7 @@
    ARTISTFILE=$(mungefilename "$TRACKARTIST")
    # If we want to start the tracks with a given number, we need to modify the
    # TRACKNUM value before evaluation
    - if [ -n $STARTTRACKNUMBER ] ; then
    + if [ -n "$STARTTRACKNUMBER" ] ; then
    # Get the trackpadding from the current track
    CURRENTTRACKPADDING=$(echo -n $UTRACKNUM | wc -c)
    TRACKNUM=$( printf %0.${CURRENTTRACKPADDING}d $(expr ${UTRACKNUM} + ${STARTTRACKNUMBER} - 1 ))
    @@ -843,7 +853,7 @@
    cdparanoia|debug)
    if [ "$WEHAVEACD" = "y" ]; then
    vecho "Querying the CD for audio tracks..."
    - TRACKS=$( $CDROMREADER -Q 2>&1 | egrep '^[[:space:]]+[[:digit:]]' | tail -n 1 | awk '{print $1}' | tr -d "." | tr 'n' ' ' )
    + TRACKS=$( $CDROMREADER -d $CDROM -Q --verbose 2>&1 | egrep '^[[:space:]]+[[:digit:]]' | tail -n 1 | awk '{print $1}' | tr -d "." | tr 'n' ' ' )
    CDPARANOIAAUDIOTRACKS="$TRACKS"
    else
    if [ -f "$ABCDETEMPDIR/status" ] && checkstatus cdparanoia-audio-tracks ; then
    @@ -1354,7 +1364,7 @@
    EDITCDDB=n
    fi
    if [ "$EDITCDDB" = "y" ]; then
    - CDDBDATAMD5SUM=$($MD5SUM "$CDDBDATA" | cut -d " " -f 1);
    + CDDBDATAMD5SUM=$($MD5SUM "$CDDBDATA" | cut -d" " -f1);
    # Use the debian sensible-editor wrapper to pick the editor that the
    # user has requested via their $EDITOR environment variable
    @@ -1387,7 +1397,7 @@
    # Some heuristics first. Look at Disc Title, and if it starts with
    # "Various", then we'll assume Various Artists
    - if [ "$(grep ^DTITLE= "$CDDBDATA" | cut -f2 -d= | egrep -ci '^(various|soundtrack|varios|sonora|ost)')" != "0" ]; then
    + if [ "$(grep ^DTITLE= "$CDDBDATA" | cut -f2- -d= | egrep -ci '^(various|soundtrack|varios|sonora|ost)')" != "0" ]; then
    echo "Looks like a Multi-Artist CD" >&2
    VARIOUSARTISTS=y
    else
    @@ -1470,7 +1480,7 @@
    echo "variousartiststyle=$VARIOUSARTISTSTYLE" >> "$ABCDETEMPDIR/status"
    if [ "$EDITCDDB" = "y" ] && [ "$UNINTENTIONALLY_ANGER_THE_FREEDB_PEOPLE" = "y" ]; then
    - if [ $CDDBDATAMD5SUM != "" ] && [ $CDDBDATAMD5SUM != $($MD5SUM "$CDDBDATA" | cut -d " " -f 1) ]; then
    + if [ $CDDBDATAMD5SUM != "" ] && [ $CDDBDATAMD5SUM != $($MD5SUM "$CDDBDATA" | cut -d" " -f1) ]; then
    # This works but does not have the necessary error checking
    # yet. If you are familiar with the CDDB spec
    # (see http://www.freedb.org/src/latest/DBFORMAT)
    @@ -1577,7 +1587,7 @@
    WAVDATA="$ABCDETEMPDIR/track$UTRACKNUM.wav"
    OUTDATA="$ABCDETEMPDIR/track$UTRACKNUM.$OUTPUTTYPE"
    if [ -r "$CDDBDATA" ]; then
    - TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | head -n 1 | cut -f2 -d= | tr -d [:cntrl:])
    + TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | head -n 1 | cut -f2- -d= | tr -d [:cntrl:])
    echo "Grabbing track $UTRACKNUM: $TRACKNAME..." >&2
    else
    echo "Grabbing track $UTRACKNUM..." >&2
    @@ -1692,6 +1702,7 @@
    SPEEXENCODERSYNTAX=default
    MPPENCODERSYNTAX=default
    NORMALIZERSYNTAX=default
    +M4AENCODERSYNTAX=default
    OUTPUTFORMAT='${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
    # Use the following VAOUTPUTFORMAT to revert to 2.0.x VA format:
    @@ -1738,6 +1749,7 @@
    SPEEXENC=speexenc
    # mpp (Musepack)
    MPPENC=mppenc
    +M4AENC=faac
    ID3=id3
    ID3V2=id3v2
    @@ -1773,6 +1785,7 @@
    SPEEXENCOPTS=
    # mpc
    MPPENCOPTS=
    +M4AENCOPTS=
    ID3OPTS=
    ID3V2OPTS=
    @@ -2039,6 +2052,7 @@
    spx) [ "$SPEEXENCODERSYNTAX" = "default" ] && SPEEXENCODERSYNTAX=speexenc ;;
    mpc) [ "$MPPENCODERSYNTAX" = "default" ] && MPPENCODERSYNTAX=mppenc ;;
    + m4a) [ "$M4AENCODERSYNTAX" = "default" ] && M4AENCODERSYNTAX=faac ;;
    *) echo "abcde error: Invalid OUTPUTTYPE defined" >&2
    exit 1
    @@ -2100,6 +2114,12 @@
    MPPENCODER="$MPPENC"
    esac
    +case "$M4AENCODERSYNTAX" in
    + faac)
    + M4AENCODEROPTS="$M4AENCOPTS"
    + M4AENCODER="$M4AENC"
    + ;;
    +esac
    # and which tagger
    @@ -2144,7 +2164,7 @@
    ${NEEDCOMMENTER+$VORBISCOMMENT} ${NEEDMETAFLAC+$METAFLAC}
    ${NEEDNORMALIZER+$NORMALIZER} ${NEEDEJECT+$EJECT}
    ${NEEDDISKTOOL+disktool} ${NEEDCDSPEED+$CDSPEED}
    - ${NEEDVORBISGAIN+$VORBISGAIN}
    + ${NEEDVORBISGAIN+$VORBISGAIN} $M4AENCODER
    do
    # Cut off the command-line options we just added in
    X=$(echo $X | cut -d' ' -f2)
    @@ -2207,37 +2227,6 @@
    esac
    fi
    -if [ "$STRIPDATATRACKS" = "y" ] && [ ! "$ONETRACK" = "y" ]; then
    - case "$CDROMREADERSYNTAX" in
    - cdparanoia|debug)
    - # cdparanoia can query the CD, so let's process the TRACKQUEUE list with the results.
    - if checkstatus cdparanoia-audio-tracks; then
    - CDTRACKQUEUE=$( cat $ABCDETEMPDIR/cdparanoia-audio-tracks )
    - else
    - ## FIXME ##
    - vecho "Querying the CD to obtain a list of valid audio tracks..."
    - $CDROMREADER -Q > $ABCDETEMPDIR/cdparanoia-query 2>&1
    - # Obtain a list of valid audio tracks from the results of the query
    - CDTRACKQUEUE=$( cat $ABCDETEMPDIR/cdparanoia-query | egrep '^[[:space:]]+[[:digit:]]' | awk '{print $1}' | tr -d "." | tr 'n' ' ' )
    - fi
    - # Obtain the track padding value from the before-processing list and pad the CD list
    - TRACKNUMPADDING=$( echo $TRACKQUEUE | awk '{print $1}' | tr -d " n" | wc -c )
    - for TRACK in $CDTRACKQUEUE ; do
    - TRACKNUM=$(printf %0.${TRACKNUMPADDING}d $(expr ${TRACK} + 0 ))
    - PADNEWTRACKQUEUE=$(echo $PADNEWTRACKQUEUE $TRACKNUM)
    - done
    - CDTRACKQUEUE=$PADNEWTRACKQUEUE
    - # Now, compare if the values in the list are valid tracks in the CD
    - for TRACK in $TRACKQUEUE; do
    - if echo $CDTRACKQUEUE | grep $TRACK >/dev/null ; then
    - NEWTRACKQUEUE="$NEWTRACKQUEUE $TRACK"
    - fi
    - done
    - TRACKQUEUE="$NEWTRACKQUEUE"
    - esac
    -fi
    # Create playlist if needed (backgroundable) and start reading in tracks
    @@ -2446,7 +2435,7 @@
    # TRACKNUM=$(printf %0.${TRACKNUMPADDING}d $(expr ${UTRACKNUM} + 0))
    TRACKNUM=$UTRACKNUM
    CDDBTRACKNUM=$(expr $UTRACKNUM - 1)
    - TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | cut -f2 -d= | tr -d [:cntrl:] | sed 's/ +$//')
    + TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | cut -f2- -d= | tr -d [:cntrl:] | sed 's/ +$//')
    splitvarious
    fi
    fi
    the patches can also be found here http://www2.rudefyet.com:8080/patch
    please post any other issues you have

    not yet, i'm going to work all the kinks out before i submit it
    as of right now I noticed some major typos, on my part, that cause it to fail...i'm working on that right now

  • Table Pagination in the  12345 format

    Hello,
    My Jdeveloper version is 11.1.1.6.0.
    I drag and dropped the database table data control on to the page and I want to implement pagination for this table in the form as below:
    *12345>* These are the page number and <,> are the arrow to go to next and previous pages. also I want to maintain drop down to show no of result/records per page . What will be the procedure to do this approach.How to get the records as per pagination .Is there is any buildIn method to do that or should I have to do this programatically by using some logic.

    Thank you Timo Hahn,
    Its working correctly but to show the pages in format of links like *<12345>* what should I do? what logic I can build for showing like this
    Edited by: 925410 on Jul 3, 2012 5:54 AM
    Edited by: 925410 on Jul 3, 2012 6:00 AM

  • No postings can be made to profit center AAAA in company code ABCD

    Hi Gurus,
    Good morning.
    Please help on below.
    Our user encountered error "No postings can be made to profit center AAAA in company code ABCD" while doing GR. Can please help on what caused the error?
    Any config to be checked?
    Thanks a lot.

    Hi,
    Either go to material master and change the profit center which is active as of today or choose your profit center XXXX and change its validity (KE52)
    Aslo check in KE59 it is active or not.
    Cheers,
    Kumar.S

  • Idoc to file with file name as ABCD timestamp and count

    Hi,
    Greetings!
    I have an requirement like iDoc to File and the output file name should be ABCDYYMMDDXX (e.g ABCD14091701) in PI 7.1
    where,
    Default = ABCD
    YY = year
    MM = month
    DD = date
    XX = sequence no. on the same day; e.g. first batch on same day = 01, second batch on the dame day = 02
    I tried checking many blogs but its not meeting this requirement.
    Kindly please help me out in completing this interface.
    Regards,
    Vinoth

    Hi Vinoth,
    Below is the code. Use it in-conjunction with your dynamic config code.
    String inputFile = "D:\\Receiver"; //This is your target receiver folder
      String dateStr = DateFormat.getDateInstance().format(new Date());
      dateStr = dateStr.substring(0, 2)+ dateStr.substring(3, 5)+ dateStr.substring(8,10);
      final String fileNamePattern = "DEFAULT"+dateStr;
      File file = new File(inputFile);
      File[] listFiles = file.listFiles(new FilenameFilter() {
      @Override
      public boolean accept(File dir, String name) {
      if(name.contains(fileNamePattern))
      return true;
      return false;
      //System.out.println("Number of files in the directory "+inputFile+" : Next Counter"+ (listFiles.length+1));
      int counter = listFiles.length+1;
      String fileName = "";
      if(counter < 10)
      fileName = fileNamePattern+0+counter;
      else
      fileName = fileNamePattern+counter;
      System.out.println("Name of the file will be:"+fileName);
    Hope it helps!
    Best Regards,
    Anand Patil

  • User abcd has no RFC authorization for function group SYST

    hi,
       We are trying to http<>XI<>RFC scenario.
    When we are  sending request from http to xI.
    We got the followin response.
    <b>"User abcd has no RFC authorization for function group SYST"</b>
    Kindly let me know what authorization to be given to the user abcd.
    Regards,
    Nishita

    you need to give that user auth. object S_RFC for FUGR SYST and activity *.
    You can double check in transaction SU53 of the target system which check failed for the respective user. There it should show the auth. object mentioned above.
    Regards
    Christine

  • "Canned Magazine Title 12345..." in Adobe Content Viewer?

    I am using Folio Builder in InDesign to create iPad folios. When I view a folio in Adobe Content Viewer, the words "Canned Magazine Title 12345..." appear at the top. Does anyone know how to remove this type or change it?

    Are you using preview on device?

  • Message mapping -How to change 1.2345 to 12345

    Hi everybody,
    How can I have all the digits of the source field in the target field with the decimal pont removed.
    Source field --1.2345
    target field --12345
    thanks,
    Ramya Shenoy

    Hi,
       Prepare an udf to remove decimal point.
      you can use the following java code for udf .
           String s1="";
                  for( int i=0; i<a.length();i++)
                       if (a.charAt(i) == '.')  {}
                          else
                           s1= s1 +a.charAt(i);
                 return s1;
    regards
    mahesh

  • The entry ABCD ABCV  is missing in table T043G

    Hi
    I have to clear an open invoice manually using F-53.
    This is the error message i m getting
    "The entry ABCD ABCV  is missing in table T043G"    [Here ABCD is the company code]
    Please Help!
    Thanks!

    HI,
    please check if Your company code is defined in transaction OBA3
    or check the path IMG -> Financial Accounting -> Accounts Receivables and Accounts Payables -> Business Transactions -> Incoming Payments -> Manual Payments -> Define Tolerances (customers)
    Go through the customer master  and check which tolerance group the customer is assigned to (field' technical name is LFB1-TOGRU.
    Regards,
    Satish Muvva.

  • No direct postings can be made to G/L acct. 12345 in CoCode 123

    Hi All,
    While creating a PR am getting th message as below:
    No direct postings can be made to G/L acct. 12345 in CoCode 123
    Please advise on the best practice as I dont want to remove the automatoc postng check box from FSS0.
    Also what will be the G/L account in case i create free text Purchase requisition
    Also, I checked the G/L account has not be created as Materials Management accout
    Pls advise
    Thanks,
    Venky
    Edited by: SAP SRM123 on Sep 6, 2010 4:04 PM
    Edited by: SAP SRM123 on Sep 6, 2010 5:05 PM
    Edited by: SAP SRM123 on Sep 8, 2010 8:57 PM

    resolved on my own

  • N95 8GB - Default Code 12345 Not working

    I want to reset my phone to original factory settings and my phone does not accepts default code 12345, how can this issue be resolved.

    post007, that is the case for some models but not all. On some FP1 based phones the hard reset actually reset the security code, I believe the N95 8GB was one of the models that this could be done on.
    So it is worth taking grschinon's advice and giving it a try.
    If it fails to solve it the only option is to contact a nokia care point.
    Care points/service centres and repair info:
    UK • Europe • Asia-Pacific • USA •
    Canada • Middle East and Africa
    Elsewhere: Click here, select your country, go to the support section, then select repair.

  • String "abcde" split to "a","b","c","d","e"..

    Hi guys,
    I'm new here, Who could tell me a way to resolve the problem??
    Now, I have a String "abcde" and I want to use the API : String.split();
    and I want the result is a String[] : "a","b","c","d","e"
    please give me some suggestion.
    thx

    Welcome to the forum.
    user11230334 wrote:
    Hi guys,
    Now, I have a String "abcde" and I want to use the API : String.split();
    and I want the result is a String[] : "a","b","c","d","e"<tt>String.split()</tt> is not able to do that.
    you have (at least) 3 options:
    1. Use regular Expression and Pattern
    2. use StringTokenizer
    3. use <tt>String.substring()</tt>
    bye
    TPD

  • In the os5, the alphabet in the right of contact is abcd, but in OS7 is A.D.G, how to set it like OS5

    In the os5, the alphabet in the right of contact is abcd, but in OS7 is A.D.G, how to set it like OS5

    You can't. That's just the way it is in iOS 7. Still performs the same task.

  • Process proc=runtime.exec("sh","-c","//home//usr//mkdir abcd") not working

    my servlet calling the above line is not executing to make a directory
    "abcd" at specified location. i am using Mandrake Linux and Tomcat... can anybody expalin the error.

    Hi raghutv,
    I also have this error
    I use Tomcat 4.0 and Window Me
    Do u think that the problem is "Window OS" or Tomcat Setting
    I have a problem. I want to complie the other Java Program "hi.java" using servlet.
    I am compiling the servlet code succesfully, but the web page can't display anything.
    The real path of "hi.java" is in the
    D:\Program Files\Apache Tomcat 4.0\FYP\WEB-INF\classes\hi.java
    This is my servlet code..............pls help.............thx!
    /*********************** Hello.java *********************/
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Hello extends HttpServlet
    public void service(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    try {
    String path = getServletContext().getRealPath("\\WEB-INF\\classes\\hi.java");
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec("javac.exe " + path);
    BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream()));
    PrintWriter com_out = res.getWriter();
    com_out.println("<pre>");
    String line = null;
    while((line = br.readLine()) != null){
    com_out.println(line);
    //String[] cmd = { "ping.exe", "time.nist.gov" }; // Command and argument
    //String[] cmd = { "javac.exe","hi.java"}; // Command and argument
    //Process process = Runtime.getRuntime().exec(cmd); // Execute command
    //Process process = Runtime.exec(cmd); // Execute command
    //process.waitFor(); // Wait until process has terminated
    catch (Exception e) {
    System.err.println(e);

Maybe you are looking for

  • [tuner card] cx88 alsa buffer under-run (on xc4000)

    I'm having really weird bug and I don't know where should I look for help. I own Leadtek WinFast DTV2000 H Plus card with Conexant CX2388x PCI bridge and Xcieve XC4000 tuner. I'm using it with mplayer to watch analog cable tv. I'm suffering from buff

  • Menu problem with IE

    menu problems with IE connected with spry - see site: 1. http://www.whatwomenwant-tv.com/index.html (horizontal menu bar - will not display fully, probably to do with flash) 2. http://www.whatwomenwant-tv.com/about.html (horizontal menu bar swerves t

  • Can't view adobetv after flash update

    I am having this problem now after today's flash update. I uninstalled flash and reinstalled it. I have checked settings, deleted my browser cache, deleted my flash cache before I uninstalled it, rebooted and reinstalled it. I am unable to view anyth

  • Matrix report vertical line problem

    Development tool: Report Builder 11.1.2.2.0 (64-bit) on Windows 7 Solaris app server with the following software versions: Oracle Forms and Reports 11g 11.1.2.2.0 FMW is 11.1.1.7 WLS is 10.3.6.0.8 This is a report with a matrix.  The rows across have

  • Appraisal template is not allowing to enter values in 25 infotype

    Dear consultants,    I have created an appraisal status and released it .and its showing in 25 infotype . when i click the execute button it should allow me to enter the ratings but its not happening when i execute all fields are grayed out and i can