Why does it works that way??

I use str.replaceAll("\\P{ASCII}+", "") to get a string free of all non-ASCII chars. However I don't understand something.
We usually say "jjjrr".replaceAll("j", "") to remove all j from the string and the result will be rr.
By writting \P{ASCII} we say whenever you find an ASCII char deleted it. but we get the result of deleting all non-ASCII chars.
\P{ASCII} from regex]
Plz answer

\p{ASCII} is the set of ALL ASCII characters
\P{ASCII} is the set of ALL NON-ASCII characters
Please see the Javadoc for java.util.regex.PatternI gave him links to regex tutorials and to the Pattern API docs and told him specifically which section to look at. Apparently the OP can't be bothered to do any research on his own.

Similar Messages

  • Combobox in array--why does it work this way?

    I have attached a snippet of a subVI I'm using to initialize the items and set the values of comboboxes in an array. I modified it slightly so the array being referenced is on this block diagram, not a top level diagram. It took me a while to come to this solution; before I had the combobox part in a for loop and was trying to loop through each array element, get a reference to that element, and set the strings[] and value properties but it was acting all wacky. Then I changed it to the way below and it automatically populates all the comboboxes with the correct values, and then sets their values each to be different (which is what I want!) My question is, why does it work this way? I understand all elements in an array need to be the same (although I did find a work around here.), but the part about setting the values to each be different I was trying to do manually with a property node and a value property, when I realized the combobox just handles it all itself. Is this just a feature of a combobox in an array I need to note for future reference? 
    edit: I noticed the testers array reference label changed, so hopefully it's still referencing the same control. You may need to relink it.
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    combobox in array snippet.png ‏29 KB

    nathand wrote:
    Ben wrote:
    nathand wrote:
    You cannot get a reference to an individual element in an array control.  The ArrayElem reference will always refer to the same control regardless of what array index is visible.  This isn't specific to a combo-box, every array works like this.
    I have not tested it lately but as of the time of this Nugget I found that it will point to the top left visable array element.
    The ArrayElem property always returns the same reference no matter which element of the array is in the top-left corner, as demonstrated by the code below (screenshot instead of snippet to avoid mangled references and property nodes).
    Yes that is true but the value returned when using a property node >>> value will return the top left displayed value. In the code included in that Nugget, I set the size of the control such that it only shows a single element then by manipulating the index control I can raed each element in the array.
    At least that is how it behaved back in the day of that nugget.
    Yes, my wife left me home alone with a case of beer and LV to find that tidbit. I suspect that feature will one day disapear without anyone noticing.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Archive workflow for FCSrv - does it work that way?

    Hi,
    we are installing FCSvr in our shop by the end of the month and after a lot of reading I have a question about an archiving workflow and if that works that way?
    We have about 1 TB of files each month that are finished productions that need to go. Deleting is not an option as we often have to go back and do changes, we also want to have the clips somehow (digital, not only on video tape) available for later production. Final Cut Server sounds like a solution, eh?
    We have 1x Xserve with FCSvr and 1x Xserve RAID connected via fiber uplink via trunked Gbit ethernet (works for us..)
    The idea is to connect a Netgear ReadyNAS 1100 (Link: http://www.netgear.com/Products/Storage/ReadyNAS1100.aspx) with 3x 1TB SATA discs in Raid5 (4th slot is empty) to the network. Name would be archive001.
    In FCSvr I would setup a device and tell it to use as archive space.
    Once full (or lets say around 80%) I unmount the raid and shut it down, label the 3 drives and stick them in the shelf.
    3 new drives go into the Netgear, I setup archive002, make it a new device in FCSvr and tell it to use as archive.
    And so on and so forth.
    In the case an editor needs an old shot / project (happens not very often, I'm calculating with max 4x a month, excluding if they need data that is on the device that is still mounted because its not yet full) FCSvr tells me where the archived asset is (?), let assume on device archive001.
    I go to my shelf, grab the drives, stick them into the Netgear, and the person is able to grab the asset.
    What happens if an user requests a restore and the "wrong" raid is mounted? (the device is not there?) Does he get an appropriate error message so that he can tell the IT person to change drives or how does that work?
    Cost wise: the Netgear is about 1100 EUR and we already have a unit so in case one fails and we cannot get a new one (any more) we are sort of covered and can copy to a new system.
    Each 1 TB is about 90 EUR at the moment, though Raid5 I can use 2 TB out of 3, so I end up paying 270 EUR for 2 TB of archive (plus the initial RAID).
    The system is scalable (to some extend).
    Future goal (2 years down the line?) would be a Object Matrix setup with Xserves and Promise 12-24 TB RAIDs. But not now (money)..
    What do you think?
    Any input greatly appreciated.
    Tobi
    PS: Data Tape: been there, done that, dont like it (for this purpose, we use data tape e.g. to create "Master" of XDCAM footage) and too inflexible (I actually hope to reuse all the 1 TB drives for the Object MAtrix thing one day).

    Hello,
    you might write a pre restore script which checks if your archive volume of choice is available. If not, it can then send an email to your administrator, so that he can make that volume available.
    Regards,
    André

  • Hi I am trying to verify my icloud on my phone, it has given me my very old email address to use, but I no longer have access to that address, hw can I update email address. I have tried going into my account but it does not work that way.

    Hi icloud is asking me to verify using a very old email address that I no longer have access to. Apple are acknowledging me on a different email, so how come icloud have a very old one?

    This site didn't say anything about one wrong ID, but only talks about changing the Apple ID.  If it didn't work the first time why should it work now?

  • Why does it say that the updated version of Firefox (which I am trying to download) is not compatible with my operating system when I have Mac OS X 10.5.8?

    Why does it say that the updated version of Firefox (which I am trying to download) is not compatible with my operating system when I have Mac OS X 10.5.8? I had an older version of Firefox and it said I needed to update it but that was the message that appeared.

    Sorry, it's because Firefox 4+ are only compiled for the Intel processors.
    There is a separate project for PPC Macs called Ten Four Fox. You might give it a spin when you're tired of 3.6.
    http://www.floodgap.com/software/tenfourfox/

  • When i was waiting for an hour for itunes to grading my 2nd generation ipod touch to a 4.2.1 and it was about done, it suddenly said the network connection timed out and that made the upgrading a fail. Why does it do that? and what does it mean?

    When i was waiting for an hour for itunes to grading my 2nd generation ipod touch to a 4.2.1 and it was about done, it suddenly said the network connection timed out and that made the upgrading a fail. Why does it do that? and what does it mean?

    Error -3259 is a network timeout error, usually. This article might help:
    http://support.apple.com/kb/TS2799

  • I customize my paper size and print size and am then viewing a photo on my screen. I print it out and it chops off about 5% of all edges of my original photo on the screen. Why does it do that? It is driving me crazy. I use an Epson Photo 2200 printer.

    I customize my paper size and print size and am then viewing a photo on my screen. I print it out and it chops off about 5% of all edges of my original photo on the screen. Why does it do that? It is driving me crazy. I use an Epson Photo 2200 printer

    What print and paper sizes are you using?  Are you trying to print a borderless print?  Does your printer support borderless for that particular size?  Are you printing to the custom stock size or to a larger stock size?
    OT

  • When i try to export my videos using quick time conversion FCE exits out on me. why does it do that?

    When i try to export my videos using quick time conversion FCE exits out on me. why does it do that?

    Does it always happen at the same time during the export?
    Can you play through the entire Sequence in FCE without any problems?
    What are your Sequence settings in FCE>
    Have you rendered fully prior to exporting?
    Which export settings did you use?
    -DH

  • HT203088 I have the CANON REBEL T5 1200D, and when i connect it to my mac which is 10.10 the new OS X YOSEMITE it says that it "Cannot be used with this version of the operating system" why does it say that?

    I have the CANON REBEL T5 1200D, and when i connect it to my mac which is 10.10 the new OS X YOSEMITE it says that it "Cannot be used with this version of the operating system" why does it say that if my camera is listed under the supported digital cameras for OS X YOSEMITE?

    Put simply, the minimum system requirements for iTunes have changed. You need a Mac running at least OS X 10.6.8.
    It's best you look online to see if your model of Mac can be upgraded to at least 10.6.8 "Snow Leopard". It should still be possible to order a copy of Snow Leopard if so.

  • When I started up my macbook Pro after a boat trip (just lying in my bag the whole time) it started making weird sounds. Why does it do that and how do I stop it?

    When I started up my macbook Pro after a boat trip (just lying in my bag the whole time) it started making weird sounds. Why does it do that and how do I stop it?

    The 13" retina MBP has two fans, left and right near the hinge and about 2.5" each from the edges of the case.
    My conjecture is that one of the fans may be failing.  An appointment at an Apple store genius bar is the best option.  The evaluation will be FREE and a fan replacement (if that is the problem) should not break the bank account.
    You might run an Apple Hardware Test:
    http://support.apple.com/kb/PH11342
    This may confirm my suspicion or perhaps find a different problem. Note that an error free result should not be viewed as being definitive.
    Ciao.

  • Why does Apple Works change my Excel document to Apple Documents?

    Why does Apple Works change my Excel documents to Apple Documents?

    It's a nuisance when other users cannot open the file, any ideas?

  • Dropbox does not show up as an option for "Save As" as OneDrive does (came preinstalled that way).

    Dropbox does not show up as an option for "Save As" as OneDrive does (came preinstalled that way).  Dropbox is installed but I had to use Selective Sync since the Stream only comes with a 30GB drive and my Dropbox account is 1TB.

    Hi @gatesoui ,
    Thank you for visiting the HP Support Forums and Welcome. I have looked into your issue about your HP Stream Notebook and issue with DropBox. Here is the support site for Dropbox.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • My apps on my iPod 4th generation keep closing out on me, why does it do that, and how can I stop it?

    My apps on my iPod 4th generation keep closing out on me, why does it do that, and how can I stop it?

    The above comment is not helpful to me, and I'm also guessing many people, but who knows. I've seen the same recommendation in many, many threads on this same topic, but only once have I seen that the resolution solved the problem for anyone, unless those people didn't follow up. Anyway,I found the below comment which made sense and may be the source of the issue. Too many apps running in the background - turn them off or simply do a hard reset to kill them all at once.
    WeShallAttack:4 months ago | Last edited at 12:27PM on 10/20/2013
    Apparently, ios closes apps it can't (or thinks it can't) run because of too few RAM available. Double-press the home button and close any still running apps in the background. There are apps that serve to clear up some of your RAM. You will need to do this every once in a while, though.
    Clearing disk space will also help - remove any files you don't need/use and try to keep a clean disc in overall.

  • My iPhone says connect to iTunes but i synced it to a different computer and my lock/sleep button is broken so i cant turn it off. I tried letting the battery die so I could try out the iPhone recovery method however it didn t work that way either. Any he

    My iPhone says connect to iTunes but i synced it to a different computer and my lock/sleep button is broken so i cant turn it off. I tried letting the battery die so I could try out the iPhone recovery method however it didn t work that way either. Any h

    The only way out of Recovery mode is to connect to iTunes and restore. If you cannot access the computer you normally sync with, you will lose all of your content, unless you sync to iCloud. With no backup present, your content will be lost.

  • I combine 3 different invoices to create a single file,when it is done combining the files,all three invoices are the same,but i picked 3 different invoices,why does it do that?

    i combined 3 different invoices to create a single file,when the program is done combining the files it makes all the invoices the same,it does not have the other 2 invoices in it,makes 3 copies of the first invoice,why does it do that?

    I was having the same problem.  The trick is to flatten the forms before combining.  It is in the tools - print production menu.  If print production isn't there click on where I am indicating with the top blue arrow.

Maybe you are looking for

  • Page has a custom page size message

    On the master pages, on a locked layer, we have a frame whose content is set to "Undefined" that is sized to exactly match the page size. This is so the page trim can easily be seen and measured in PDF and when printed and we've never had any trouble

  • Help with export format - can I meet ad requirements?

    Help! I need to create a color ad for magazine. Starting with a file in either PDF or EPS. Need to tweek existing file by changing some of the text and adding a logo. Final product is for magazine ad with media requirements: Preferred High Resolution

  • Can you edit an existing theme in imovie?

    I like the existing themes in imovie, but I would like to edit them to include my logo (ie. like the CNN iReport rather than a map of the world), how would I do that?  If I cannot edit an existing them, how do I make my own?  Thank you in advance for

  • Radeonhd and Audiohd on Solaris 10 (x86)

    This is getting rediculous. We have have several X86 boxes now, some almost 2 years old, that are not properly supported now by Solaris 10. What ever happened to the Sun concept of backporting important stuff from the next release to the current rele

  • How to free up or clean the memory in a WebForm?

    Hi everybody! I need you help. I'm working with web forms with data base connections. In the first moment, I can see the memory  state by Task Manager and the memory is loaded in 1.50 GB. After of run the project, the application start to eat the mem