Help with regEx or any other idea ....

my program reads from the keyboard... if there is a character like K the description is printed ... but if there is also a number between 2.....10 and K then the number should be printed too
example :
reading from keyboard: 4K
then 4 + description of K should be printed
I tried this:
else if(n.equals("S") && notationShort.containsKey("S")|| (n.equals.{2,10})
     {System.out.println(notationShort.get("S"));}but its not working ... can someone help please?
thank you in advance!

sabre150 wrote:
new_in_JAVA_but_soon_not wrote:
not sure if someone understand my question ?? or no one know how to solve it?
hmmmHmmm - I certainly don't fully understand what you are trying to do. It seems to me you want to test for some digits followed by one of a set of letters. If this is the case then what set of letters and how many digits. Also, can other things come before the digits or follow the letter?
You need to think a bit more about your questions if you expect any answer other than a wild guess.ok how can i write in regular expression the range between 2..10 ?

Similar Messages

  • I've read others' posts on this issue and still need an answer that works. Safari keeps dropping wireless; no issues on a Dell laptop with XP in same room. Cleared cache, etc. - any other ideas?

    I've read others' posts on this issue and still don't have an answer that works!  Safari keeps dropping wireless connection every 5 - 10 minutes (it's gotten progressively worse over the last month). My husband, sitting 10 ft across from me, has no issues on a Dell laptop with XP so doesn't appear to be the router or ISP. Safari v5.0.6 Mac OS 10.5.8. Cleared cache, tried kill commands in Terminal, restarts, etc. Only restarting seems to keep it at bay for a period, but then it will start again. Any other ideas?

    You posted a question about a problem connecting a Mac to a wireless router. You have an old Dell laptop that works well with that router.
    I pointed you to a brief discussion with another poster who had a problem connecting a Mac to a wireless router. He had an old Dell laptop that worked well with that router. I suggested he upgrade the router firmware. He upgraded it, and the problem was solved. Another poster in that thread did the same thing, and his problem was also solved. Within the last day or two, I made the same suggestion to a third poster in another thread, and his problem was solved too.
    Conclusion: Upgrading the router firmware helps sometimes.
    If I understand your response, you think that checking for a firmware update isn't even worth a try. Am I missing something?

  • I have a mid 2010 Macbook Pro running Snow Leopard and foolishly upgraded to Yosemite.  Is it possible to go back in time with Time Machine and reinstall Snow Leopard.  Then upgrade to Lion or Mavericks?  Any other ideas on how I can exit Yosemite?

    I have a mid 2010 Macbook Pro running Snow Leopard and foolishly upgraded to Yosemite. Now have numerous problems.  Is it possible to go back in time with Time Machine and reinstall Snow Leopard?  Then upgrade to Lion or Mavericks?  Any other ideas on how I can exit Yosemite?

    Once you get yourself back to Snow Leopard, if you still want to upgrade somewhat, I would suggest the following:
    1. Get an external hard drive that you can use for experiments with new OS versions. You could partition it into 2 or 3 partitions. You could then clone your existing Snow Leopard system to one partition using Carbon Copy Cloner (well worth $40) or SuperDuper ($25).
    2. Buy OS X Mountain Lion for $20, through the Apple online store (I don't think it's available through the App Store). Apple has decided to make it very difficult for anyone to get Mavericks unless they have already downloaded it.
    You will receive two e-mails from Apple, one containing a PDF with a redemption code, and one with the password you will need to unlock the PDF. Using the code, you will download Mountain Lion from the App Store, where it will appear among your Purchased items.
    After ML finishes downloading, its installer app will launch itself. When you see this launch screen, QUIT the install app immediately! Go to your applications folder, find the Install OS X Mountain Lion app, and copy it to a safe location outside of your Applications folder. Keeping one or more copies will allow you to reinstall without unnecessary aggravation if you later need or want to do that. At this point, you can re-launch the Installer in the Applications folder and let it run. You can install it on a clean partition on your external HD, or you can allow it to upgrade the Snow Leopard clone you created on your external drive, or you can do both. This should allow you to test how everything works for as long as you like.
    3. If you left yourself a free partition on your test drive, try a clean install of Yosemite and set everything up from scratch (do not migrate anything). This will allow you to see whether your problems with it were related to something in your Snow Leopard system.

  • Experiencing trouble syncing with the 10.3 version of iTunes on my Windows Vista machine. Have uninstalled all Apple software twice, reinstalled and continue to get an error 7 message in connection with the Photo Processor. Any other ideas to try?

    Experiencing trouble syncing with the 10.3 version of iTunes on my Windows Vista machine. Have uninstalled all Apple software twice, reinstalled and continue to get an error 7 message in connection with the Photo Processor. Any other ideas to try?

    Hi,
    got it fixed! My Son had both files on his Win7 iTunes installation. Never mind he had no issues whith ths iTunes and iPhone Sync. So I checked my other Win XP PC, where I don't have this problem syncing my ipad, and surprise. Both files do NOT show up on this PC. So I renamed the iTunesPhotoProcessor.exe I found under c:\program file\iTunes and synced again my iPhone and it went through without any error. So the problem might be and unremoved iTunesPhotoProcessor.exe or the missing iTunesPhotoProcessor.dll under the iTunes install root folder and this even if I had checked that the folder was completely removed during iTunes unistall.
    Please try yourselve and just rename the iTunesPhotoProcessor.exe to iTunesPhotoProcessor.exe_ under c:\program file\iTunes or get a copy of the missing iTunesPhotoProcessor.dll and cp to c:\program file\iTunes.

  • Hi guys, my ipad2 says that it needs to cool down before using. It has been sitting in a cool place over a day now but the message still pops up. Any other ideas? or help?

    Hi guys, my ipad2 says that it needs to cool down before using. It has been sitting in a cool place over a day now but the message still pops up. Any other ideas? or help?

    Is the iPad Off and not connected to the charger?
     Cheers, Tom

  • HT1420 i can't seem to get my iPad to synch with my new iMac.  The iTunes prompt says that this computer isn't authorised although i have registered it on iTunes.  Any other ideas for how to overcome this block?

    i can't seem to get my iPad to synch with my new iMac.  The iTunes prompt says that this computer isn't authorised although i have registered it on iTunes.  Any other ideas for how to overcome this block?

    What do you mean by 'registered it on iTunes' ? You've authorised your account on your Mac's iTunes via the Store > Authorise This Computer menu option ? And you've copied your library onto the Mac ?
    Copying content between computers : http://support.apple.com/kb/HT4527
    You may also find this page for syncing to a new computer useful : https://discussions.apple.com/docs/DOC-3141

  • Computer won't boot--suggested fixes haven't worked.  Any other ideas?

    Hi, this is kind of a last-ditch effort, hoping to find out if someone has a magic spell I can try (perhaps some command I can run from single-user mode?) The problem: my new MacBook pro won't boot up (gray screen, apple logo, windmill of death) and I've tried all the suggested avenues: it won't respond to Safe mode, I've reset the PRAM and the power, I've done fsck -y: nada. The problem is that I'm out of town, and so don't have my original install disk or access to an Apple Store. I've tried booting from someone else's OSX disk, to no avail--Apple Care says that other people's disks won't work. So basically I have to wait for the universal OSX disk to come from Apple, which will take days--in the meantime, does anyone know anything else I can try? I realize I'm probably SOL here, but I figured it's worth a shot to see if anyone has any other ideas. I'm desperate.
    Thanks in advance for your help.

    Yes if you have no firewire port then you will not be able to use Target Disk Mode. But if your partner with the mac happens to have a bootable backup then you could boot into it using USB port, As long as they have the backup in a USB enclosure.
    I realize that you stated you tried everything to no avail but we are new to your efforts. So just to clarify any miscommunication on our part here are a few links that you can verify with us the procedures you have used in your effort.
    SMC reset:
    http://support.apple.com/kb/HT1411
    PRAM reset:
    http://support.apple.com/kb/HT1379
    Safe mode:
    http://support.apple.com/kb/HT1455
    Resolving startup issues using fsck -y:
    http://support.apple.com/kb/TS1417
    Look towards middle of above article for "Use fsck if necessary"
    Can you tell us what happened before the problem started? i.e. Software update, normal shutdown, upgrade hardware, change any configuration, applications started to hang with spinning beach ball, etc...

  • I went to Dell website and there were no listings for Mac so was unable to download printer. Any other ideas????

    I went to Dell Website and there were no listing for Mas so was unable to download anything to help. Any other ideas????

    If you have already downloaded it, have you installed it yet? I know the most recent Flash plug-in isn't optimized for Chrome, but Safari works just fine with it. There should be an arrow pointing down in your upper right hand corner of the screen. If you tap on that, it will list your downloads. Tap on the Flash download and you should be able to follow the prompts to install the plug-in.

  • My iPad would not complete the back up to iCloud.  The solution re: resetting my iPad did not work.  Are there any other ideas?

    My iPad would not complete the back up to iCloud.  The suggestion re: resetting the iPad did not work.  Are there any other ideas?

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • I keep getting error msg -42408 I have tried everything from Roy B and still get ther msg. Any other ideas?

    I keep getting error message -42408 when I try to open ITunes Store.I sent a email to support and they sent me a link from Roy B,I tried both of his sugegstions and neither worked.Anyone have any other ideas????

    Did you get anywhere with this, ikeaheerlen?
    I am having the same sort problem (although my keyboard is recognized so I'm much further along than you).
    I had a MacBook Pro with an XP SP3 partition and a Windows 7 partition on it.
    I switched to a Mac Pro and wanted to migrate them over to it.
    I used WinClone to make backups of both partitions and transferred the WinClone images to the Mac Pro.
    I manually created the partitions and restored the WinClone images into each one.
    But VMware wouldn't recognize either one.
    So I deleted them both, and let Boot Camp Assistant (re-)create a single Boot Camp partition.  Then I restored the Windows 7 WinClone image into it.
    Ever since then all I get is "BOOTMGR is missing" error.
    I thought maybe since I had dual-boot working (with a boot manager) in the old MacBook Pro setup, that the boot manager must've lived on the Windows XP SP3 partition, and it's completely missing from the Windows 7 partition.  So I figured I needed to recreate it somehow.
    After using the Windows 7 DVD ISO disc image to boot from, and trying several automated/manual steps, I can now actually get VMware to recognize the Boot Camp partition as being one, but when it tries to set it up for use with VMware, it complains that it isn't ready because it must have shut down incorrectly.  It says to boot into Windows, then do a clean shutdown.  But when I select the Boot Camp partition from Startup Disk, it boots from it but I still get the "BOOTMGR is missing" error even in a 'native' Boot Camp boot
    I've tried all the steps I can find (including manual "bcdedit" steps booted from the Windows 7 DVD disc image) to no avail.  I don't know what else to try at this point ...

  • Any other ideas on the reception issue?

    I am wanting to ask if anyone else has any other ideas on fixing the reception issue?
    I just got off the phone with an Apple "Supervisor". He agreed with me that the software update will only correctly display AT&T's signal that I am getting. He agreed that it will NOT remedy the dropped calls that alot of us are now getting with the use of the new iPhone 4. He also agreed that I either need to hold the phone differently or pay extra money either to Apple or to another manufacturer for a case that I have never used on previous iPhones.
    So, I am not going to return my beautiful new iPhone 4, but I do want to find out if anyone else has found anything else to remedy this problem without doing anything listed above. I am not trying to beat a dead horse, but I am tired of dealing with the big corporation that Apple has become. The same corporation that now, only cares about the number of iPhones and "Bumpers" sold as opposed to the customers satisfaction that purchased their iPhones.
    Message was edited by: Denverk1972
    Message was edited by: Denverk1972

    I don't have any problems either, with or without the bumpers on... it would be nice if ATT had mentioned where in particular their network was having the issues... also I've seen a lot of reports from the UK re the reception problems and one carrier's sim card (which is slightly too big and is shorting the antenna) seems to be the culprit in some cases...
    AT&T's statement is below
    "AT&T has come through with a statement on reports the company has been capping upload speeds for iPhone users.
    In a statement we first spotted through D: All Things Digital, AT&T is describing the problem as one pertaining to a software issue.
    AT&T informs that a software defect some Alcatel-Lucent equipment has been crippling 3G HSUPA performance, and says that vendor is working on a repair, though a schedule isn’t forthcoming just right now.
    AT&T and Alcatel-Lucent jointly identified a software defect — triggered under certain conditions – that impacted uplink performance for Laptop Connect and smartphone customers using 3G HSUPA-capable
    wireless devices in markets with Alcatel-Lucent equipment. This impacts less than two percent of our wireless customer base. While Alcatel-Lucent develops the appropriate software fix, we are providing normal 3G uplink speeds and consistent performance for affected customers with HSUPA-capable devices."

  • I want to buy a new Macbook pro 15", but I don't like Lion, I want Leopard installed, is there any issues with drivers or any other I should be aware of?

    I want to buy a new Macbook pro 15", but I don't like Lion, I want Leopard installed, is there any issues with drivers or any other I should be aware of?

    Hello, I've tried Lion from the day they released to last week I got my computer formated and with leopard again, on my iMac 24" from early 2009 2.9 Ghz core 2 duo, and I have installed 8 Gb of memory, and i have some complains about it, there are some cosmetic issues but mostly I'm concerned about issues bellow the hood, as I'm a stock trader and I depend completly from my computer's performance, let me explain:
    Superficial issues:
    1. They took off "spaces" and I liked it.
    2. I dont use the magic mouse, I need a more accurate mouse for my charts, and it seems they built the entire OS assuming you would use the magic mouse for gestures, scroll, etc to try to mimic in some way the Ipad and Iphone functions, but what if you arent using it like me?
    3. I never used that little rocket icon that makes all your apps appear and that could be one of the "improvements on Lion", at first sight it looks nice and slick, but if you try to use it and make it part of your daily use, you would find it is useless, it is a pain to try to arrange it the way you like it, so I rather use the spotlight to search for my apps, its faster.
    Now the MOST important, 'performance':
    1. It completly suffocate my computers hardware Leopard much more lighter, beggining from the start up that taked almost 1/3 or twice the time, and I think Lion has some bugs bellow the hood, i was doing my normal stuff, some apps running and everything, and suddenly I started to feel the computer a little slow, safari taking forever to open the pages for example, and I opened the activity monitor to see what was going on, and it was there, I was using 4 or 5 gb from my memory, and CPU making insane peaks, and Im using 2.46 gb as im writing it doing exactly the same stuff, (but Im happily using Leopard now), and it wasnt once, as i told before, I used lion since the day they released it and happened several times until it drove me nutts. But leopard not problem in that regard at all, Never.
    hope this helps, and hope some apple guys read that because lion resulted in a big disappointment for me.

  • My bluetooth suddenly stopped working soon after I upgraded to OS 10.9.4. I rebooted SMC, didn't work. Any other ideas?

    My bluetooth suddenly stopped working soon after I upgraded to OS 10.9.4. I rebooted SMC, didn't work. Any other ideas? Don't know if it's related to the upgrade. I see other complaints about bluetooth in the thread but none of the solutions offered there have worked for me.

    Make a "Genius" appointment at an Apple Store, or go to another authorized service provider. You may have to leave the machine there for several days.
    Back up all data on the internal drive(s) before you hand over your computer to anyone. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to an empty drive from any of them.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • Some calendars in iCal appear corrupted but OK on iPhone. If I sync will the calendar data on the phone restore info on the desktop iCal? any other ideas for how to sort this please?

    Some calendars in iCal appear corrupted (ie have red exclamation mark by them) but are still OK on iPhone. If I sync, will the calendar data on the phone restore info on the desktop iCal or will I lose that as well? Or could I back up the calendars on my iPhone somewhere and then import them into iCal? any other ideas for how to sort this please? it's driving me mad. thanks.

    I don't think there will be a solution to this. Exchange 2003 just isn't supported.

  • Ipod touch will not turn on, have tried to reset any other ideas?

    My ipod touch will not turn on, I have followed the apple fault finding and it will not reset either. Any other ideas?

    Try to connect in recovery mode, explained here: iPhone and iPod touch: Unable to restore

Maybe you are looking for

  • Strange flickering on MBP screen as folding shut

    I'm hoping someone can explain this, or at least let me know if they have the same problem. I have noticed that as i am closing my macbook pro screen (not shutting down the mac but folding shut) that the screen does some funny stuff. When the screen

  • Select and move text on 80 pages

    I want to move all headlines in my 80 pages long InDesign (CS4) document about 10mm downwards. Is there a way I can do that with some clicks? All titles have the same paragraph styles.

  • How do I get rid of a LIPSTICK mark??? HELP!!

    How do I get rid of a LIPSTICK mark that is now in the upper right hand corner of all my outgoing emails?? please help

  • Tecra 8000: Question about AC adaptor

    In bad englisch sorry. The power suply of my tecra 8000 isn't working it's not the wire but the reciever? in the notebook. I have a new notebook but there are some files inside the tecra and because I don't have power I can't reach it. Does anyone no

  • Adobe FormsCentral Sign In Continuous Loop Issue

    Hi, One of my co-worker is trying to sign in FormsCentral but once she enters her e-mail and password it goes into a continuous loop. By continuous loop, I mean that the page is blank and the browser is loading and looping in between 3 Adobe related