Checks and deletes all Paragraph signs / Return Characters?

Hello all
I am working on a number of fields, and are looping through them. I have to check in each field for any Paragraph signs, and delete them. (In a .txt doc, the sign looks like a square)
Here are four examples of how the records can look like:
¶London
¶
London¶City
London¶
//I tried the following code without success:
int index = Address2.indexOf('\r');
//Here is code to try getting two substrings of the parts before and after the sign.
//This code is also not working
StringTokenizer myTokens = new StringTokenizer(Address2, "\r");
while (myTokens.hasMoreTokens())
String result1 = "";
String result2 = "";
result1 = myTokens.nextToken();
Address2 = result1;
while (myTokens.hasMoreTokens())
result2 = result1.concat(myTokens.nextToken());
Address2 = result2;
Please help!! Regards
Jaco

The square in the .txt doc act as a Paragraph sign, but is it?
And is the "\r" the correct representation of it?

Similar Messages

  • How do I return a MacBook Pro to Factory Settings and Delete all Passwords before I sell the Computer?

    How do I return a MacBook Pro to Factory Setting and Delete all Passwords and Files before I sell the Computer?

    How old is your Mac?
    What version of OS X came on it originally?
    You must return it to the version of OS X that came on it originally before you sell it.

  • How to copy/paste anchor text box to its anchor point in text and delete all empty anchors?

    hi all
    i have a document of few pages but one story. The right column is the main text box and on many places anchored text boxes are placed which appeared on the left column as shown below.
    i want text of each anchor-text-box to be cut from its place and paste at its insertion/anchor point and delete all empty anchored boxes.
    I am trying since morning but i unable to reach anchor object reference. Any help on how to start with will be helpful.
    virender

    Ok, let's say you have one main text box (not anchored) and three text boxes that are anchored to text within it. The first one is anchored with text, the second one is unanchored, and the third one is empty (I'm not going to get into inline anchoring vs. custom anchoring since you didn't bring it up in your post).
    We cycle through the items on the page:
    function main(){
      var myDoc = app.activeDocument;
      var myPages = myDoc.pages.everyItem().getElements();
      for (var i = 0; i < myPages.length; i++){
        var myPage = myPages[i];
        //Checks that the page is valid, and that it is not a master page. If either is true, skips to the next page.
        if (myPage.isValid == false) continue;
        if (myPage.parent instanceof MasterSpread) continue;
        var myItems = myPage.allPageItems;
        for (var j = 0; j < myItems.length; j++){
          //Current item.
          var myItem = myItems[j];
          //If myItem doesn't have a Character parent, it is not anchored.
          //The first and third text frames would fail this test.
          if (!(myItem.parent instanceof Character)) continue;
          //We only care about text frames.
          if (!(myItem instanceof TextFrame)) continue;
          //I think the only way this would happen would be if you had an image or
          //something else unexpected within the frame. I check for it so no content
          //is inadvertently lost.
          else if (myItem.texts.length > 1) continue;
          //If we're still in this iteration of the loop, all qualifications are met.
          //Flatten the text frame.
          //I don't use layers that often so, to me, flatten makes sense. You may want
          //to use a different term if there's a chance for confusion.
          flattenItem(myItem);
    function flattenItem(funcItem)
         //Hold onto the anchor character.
        var myParent = funcItem.parent;
         //Duplicate the text from within the frame so that it appears right after the anchor.
         //There may be other methods, but this works for me. I try to avoid copy/paste
         //so as not to deal with any clipboard mishaps. I added a check in case of empties.
         if (funcItem.texts.length > 0){funcItem.texts[0].duplicate(LocationOptions.AFTER, myParent.insertionPoints[0]);}
         //Replace the anchor character itself with a space (or whatever) which also
         //deletes the text frame it was anchoring.
        myParent.contents = " ";
    I guess the takeaway might be that you're not looking at the main text frame and then checking to see if anything is anchored to it. You're looking at each text frame and figuring out if it is anchored. That's my approach, anyway.

  • I bough a Mac Pro 2010 second hand and deleted all the files without backing up now is asking me for the Apple ID of the person who installed maverick,any ideas

    I bough a Mac Pro 2010 second hand and deleted all the files without backing up now is asking me for the Apple ID of the person who installed maverick,any ideas

    If the Mac's firmware was updated, you can try this Internet Recovery:
    Hold down Command + Option + R during restart or bootup; hold until you see a spinning globe (takes up to 10 minutes). Once in the Utilities window, use Disk utility to wipe the drive, then return to the window and choose to reinstall OS X. If that works, the OS will be installed without being tied to an Apple ID.
    FWIW, if the firmware was updated, you will not be able to use the Snow leopard disk to install - I just did several tests and it does not work. You can, however, possibly install the SL onto an external drive and then clone it to the internal or (if you have a clone), boot from that and clone it back - I just tested that as well.
    If the firmware was not updated, then you can use the SL install disk.

  • When I plug in iPhone (5.1.1) to computer, playlists show up on the iPhone (when plugged in), that do not appear when it is not plugged in. And I can't erase them. I have iTunes match, and deleted all my music on the iPhone, but that had no effect.

    When I plug in iPhone (5.1.1) to computer, playlists show up on the iPhone (when plugged in), that do not appear when it is not plugged in. And I can't erase them. I have iTunes match, and deleted all my music on the iPhone, but that had no effect on the phantom playlist that shows up on the PC when I plug in the iPhone to the PC. I cannot manually move songs or playlists from the PC to the iPhone
    Help greatly appreciated.

    Unplug your Iphone out of your computer and replug it back in. It took me several times before I could do this

  • Hello. I am owner of an iPod Touch 5gen. I have an error "iTunes was unable to load provider data from sync services". I tried: All Apple's tutorials including reseting sync data, reinstalling and deleting all of iTunes components including deleting it fr

    Hello. I am owner of an iPod Touch 5gen. I have an error "iTunes was unable to load provider data from sync services". I tried: All Apple's tutorials including reseting sync data, reinstalling and deleting all of iTunes components including deleting it from system registry. My system is Windows 7 64bit.

    UPDATE: The true error is : '
    "itunes was unable to load data class information from sync services"
    Any of the topics didnt work.
    Sync on my wife's laptop works.

  • If i click to turn off my backup and delete all backup data will I lose everything on my ipad? or will it just no longer be stored in icloud?

    currently my iphone and my ipad share data in my icloud account. if i click to turn off my back up and delete all backup data, what will happen? will i lose everything on my ipad, or will it just no longer be stored in icloud?

    It will only delete your backup from iCloud.

  • I took my daughter's new Iphone 5 to shop and they replaced it with a new one.  Today she logged on to my ICloud account and deleted all my contacts and just kept the ones she wanted.  Can I retrieve my contacts, please help

    My daughter has a new Iphone 5 and we share an ITunes account.  She logged on to my Icloud Account and deleted all my contacts this morning.  Can i restore this as I now only have her friends as my contacts?

    No, data like Email, Contacts, Calendars, Reminders, Notes are only synced between devices and not included in icloud backups, so unfortunately you won't be able to restore them. Please see also: iCloud storage and backup overview: http://support.apple.com/kb/PH12519/

  • Will someone tell me what happen to my play list and how I can restore or get it back!  Apparently, apple for the second time to screw up and delete all my music again!!!

    Will some explain why apple for the second time manage to screw up and delete "all my play lists and music again"!   How can I restore it or get my music back...  If I can't get my music back the way it was the last time I used itunes I will sale both my ipod touches!!!

    Just what were you doing when it happened?
    Just sync it from your iTunes library.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I recently got a new laptop, it has no music on it and I have been plugging my iPod in and listening to music that way. Tonight it decided to sync with my iTunes and deleted all of my music. Is there any way I can get my music back?

    I recently got a new laptop, it has no music on it and I have been plugging my iPod in and listening to music that way. Tonight it decided to sync with my iTunes and deleted all of my music. Is there any way I can get my music back?

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    Sync Your iOS Device with a New Computer Without Losing Data - How-To Geek
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • When I try to print sth I can´t choose my printer. Adobe Reader only shows a printer I used years ago.I aleady deleted and reinstalled the Reader and deleted all other printers from the computer.How can I add a new printer to Adobe Reader?Thanks for help!

    When I try to print sth I can´t choose my printer. Adobe Reader only shows a printer I used years ago.I aleady deleted and reinstalled the Reader and deleted all other printers from the computer.How can I add a new printer to Adobe Reader?Thanks for help!

    Hi,
    I would suggest you to uninstall Adobe Reader using the cleaner tool and then re-install the latest version.
    Adobe Cleaner Tool:- Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs.
    Latest version of Adobe Reader:- http://get.adobe.com/reader/
    If you still experience the same issue, please share the following information:-
    - Screenshot of Adobe Reader showing printer options
    - Screenshot of Microsoft Word showing printer options
    - Screenshot of control panel- Control Panel\All Control Panel Items\Devices and Printers
    Regards,
    Nakul 

  • Is there any way to actually delete messages from my iPhone? I have already synced my iPhone, updated it, and deleted all of my backups but the messages I have "deleted" still appear in the spotlight search.

    Is there any way to actually delete messages from my iPhone? I have already synced my iPhone, updated it, and deleted all of my backups but the messages I have "deleted" still appear in the spotlight search.

    If you already have an iPhone backup or an iCloud backup, just follow the instructions on the page below
    http://www.whatsapp.com/faq/en/iphone/20888066
    If you didn't back up your iPhone, try to use WhatsApp Pocket to recover your chats:
    http://www.fireebok.com/whatsapp-pocket.html

  • If someone steals my iPhone and deletes all pictures, that will sync to my Mac. So then all my photos are lost! How do I safeguard against this?j

    If someone steals my iPhone and deletes all pictures, that will sync to my Mac. So then all my photos are lost! How do I safeguard against this?

    If your phone (plus syncing) is the only place you keep your pictures you are asking for trouble, theft or not. Back up onto an external hard disk which is only mounted when you need it, then nothing external can erase them. Then make use of Apple's facilities for protecting your phone:
    If your iPhone, iPad, or iPod touch is lost or stolen - Apple Support
    iCloud: Use Lost Mode
    iCloud: Find My iPhone overview
    Find My iPhone Activation Lock - Apple Support

  • I previously had PS CS5 Trial installed but removed it using both Control Panel Programs and deleting all files from the CS5 directory on Program Files.  I then installed a purchased product from Adobe disc using the serial number on the case.  But when I

    I previously had PS CS5 Trial installed but removed it using both Control Panel Programs and deleting all files from the CS5 directory on Program Files.  I then installed a purchased product from Adobe disc using the serial number on the case.  But when I try to launch it, I get a screen headed Photoshop CS5 Extended Trial.  It asks for the serial number and says that my trial has expired.  It rejects the serial number from the Adobe case saying "This Serial Number is not valid for this product".  It thinks that I still have the expired Trial Version installed.  How do I convince it (the program) that the Trial Version is long gone and the currently installed product was installed with a valid and accepted serial number????

    Let me know how it goes. Go into your Adobe account and register your serial number asap.
    https://www.adobe.com/account/my-products-services.html
    That way, should you lose it or you need support, it is on record that it's yours and you can fetch your s/n it from anywhere.
    There are too may sad stories here, where people forgot and the box is buried or lost.
    Gene

  • I purchased a new ipad 3.  I have all of my apps synced to the new ipad.  Can I now Erase and Delete all of the data off the old ipad without effecting my account?

    I purchased a new ipad3 and have gotten all of my previously purchase apps loaded.  Can I now perform an erase and delete all data on the old ipad without doing harm to my itunes account and my new pad?

    I just bought the new iPad over the weekend. Restored from the old iPad backup - got everything moved onto the new one gave the old one to my daughter - wiped my 4 email accounts off of the old device and then she proceeded to delete all but about 3 apps from the thing. It had no effect on my new iPad.
    You are good to go!

Maybe you are looking for

  • Adobe Reader XI not working with SBA forms in FF and Chrome

    So I am having this issue when I try to open an SBA form in chrome or FF where it will not open first try and I have to refresh the page untill it opens. IE on the other hand does not give me this problem, but I don't want to recommend my custoemrs u

  • I was charged 10 times what website shows for forw...

    I was charged 10 times what website shows for a forwarded call, from US to Netherlands! Charged $0.275 not $0.023 per minute. How can i be charged so much for a call I received, when I was not warned? On the website, the call forwarding info page lin

  • Laptop drive as an external?

    While I'm waiting for my MBP to arrive I began thinking about what I can salvage from my pismo (MB fried). I spoke with the local Apple store, and their tech guys use a FW case that takes a hd from a laptop. They use it to transfer data from an old l

  • Help needed in finding duplicate entries in invoices

    Hi, let me explian u the senario. when we enter the invoice no. in vf03 and select any item and click on pricing button. there i find the Cnty fild having duplicate entries like xr1 2 times and xr2,xr3,xr4,xr5 and xr6 all 2 times so i need to write a

  • What does the error -3208 mean?

    Everything that I try to download (songs, apps, and even updates to apps) shows up with this error. I emailed the support people and they didn't know. Has anyone else had this problem before?