"**" to be delimiter!! not only "*" what can I do!!???for StringTokenizer
In my work
If I have an equation, a+b**c+d*e
** means exponent. so b^c (but I should do that way **)
there are 5different operators ---> ** + - / *
so...I'm trying to use StringTokenizer.
such that,
StringTokenizer st = new StringTokenizer(String, "*/+-", true)
even if I make (String,"*/+-**", true) ,it does not work.
Is there any way I can do that??
please somebody help me....
As the StringTokenizer API doc says: All characters in the delim argument are the delimiters for separating tokens
In other words, only single characters are used as separators.
You might consider using Pattern and Matcher.
For example: String input = "a+b**c+d*e";
Pattern pattern = Pattern.compile("[+\\-/]|\\*{1,2}|\\w+");
Matcher matcher = pattern.matcher(input);
while(matcher.find()) {
System.out.println(matcher.group());
}
Similar Messages
-
i'am using iphone 5, i tried to update the ios 8.0.2 using the shift key in itunes update @ windows 8 i have the file which i downloaded, but it says that firmware version is not compatible. what can i do for it . help me friends
Hello vinoth1986,
After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning update issues:
If you can't update or restore your iPhone, iPad, or iPod touch
Thank you for contributing to Apple Support Communities.
Cheers,
BobbyD -
Please can somone help my in built cameral on my MacBook Pro is not working, the green light does not show again and the camera is not working . what can i do to active it back.
SemakoYuu can try to reactivate your iSight camera by opening up iMessage.. navigate to Preferences/Audio Video,and then click on Camera. IT shoudl be grayed-out if you only have one camera hooked up to your machine. If you have an external camera, then disconnect it from your machine.
-
Hi, my apple ID verification email does not contain the link for me to click in order to verify my account. Re-submitting has not worked, what can i do to verify/activate my account in order to access Icloud?
If you want to change your iCloud ID or password on your phone go to Settings>iCloud and tap Delete Account, then sign back in with your updated information. Note: this only deletes the account and any synced data from your phone, not from iCloud. Provided you are signing back into the same account and not changing accounts it will be synced back to your device when you sign back in.
-
My kids ipod touch not working, What can we do?
I connected by mistake the charger of my ipad 3 , to my kids ipod touch 4g, now the ipod touch does not power on it only displays the apple logo and then turns off, then it turns on again but only the apple logo and then turns off again, i tried reset it in itunes and did not work, What can we do? Thanks a lot for your help....
Apple Support recommends the "5 Rs": reset, restore, reading, 'riting, and 'rithmetic. I'm kidding about the last 3. Check out the iPod section of Support.
-
I just bought an iTunes card in Spain but now I'm in Switzerland and it says it's not valid, what can I do?
Sorry, but there's nothing you can do. iTunes Cards are valid only in the country of purchase. So you cannot use that card in the Swiss iTunes Store. Sell or give the card to someone back in Spain.
Regards. -
With IOS 8.1 my iPhone 5s camera is not available, What Can I to do?
with IOS 8.1 in my iPhone 5s the camera show us a black screen.
Hi Guys,
I have the same problem as describte above. After installing IOS 8.1 on my iphone 5 my front camera does not work any more. By starting the camera app I only see a fuzzy screen - switch to the back camera works but by switching back to the front camera the app freezes.
I tried:
- switch off/on the device
- hardware reset the device
- clean (remove all data) and install the 8.1 IOS again
- try to get back to the last version of IOS 7 (but this does not work)
What can I do? Iam sure it worked before. -
My mobile stolen and i have serial number only. what can i do ??
my mobile stolen and i have serial number only. what can i do ??
Did you activate Find My iPhone in iCloud BEFORE the device was stolen? If you did, then log into www.icloud.com and see if you can track the device. If you did not activate Find My iPhone, then there is no other way to track the device. You cannot use the serial number to track the device.
-
I've been trying to use my Amazon Prime instant video on my Iphone 5 and Ipod but each I'm using a proxy server therefore video is not supported what can I do to alleviate this problem
Are you a 100% sure??? Because I'm definitely given the option to do this and there are even downloads to this effect, i.e. iPhone 3G ios 6.0. I am even given this option when I plug my iPhone into iTunes. The only problem I'm having is what I have mentioned above.
-
if you are to update your iphone and after it says the simcard inside is not supported, what can yo do?
That means your phone was hacked to unlock it.
ONLY the carrier it is locked to can authorize unlocking it.
It may no longer be possible to process a legitimate unlock on a phone that was hacked/jailbroken. The hack can do permanent damage.
You can find out who it was locked to and find out if they offer unlocking and if you qualify.
Don't be surprised if you are never able to use it again. It may be permanently bricked. -
I installed new hard drive and I am trying to restore from time machine external back up. I restarted the computer and held the Command key and the R and the restore utility does not appear. what can I do
Command + R keys are for Macbooks running Lion and Mountian Lion only. ( i could be wrong on this)
you have a couple of options:
Do a clean install of Snow Leopard via Install DVD.
Clone your old hard drive to your new hard drive via Carbon Copy Cloner
Or click on the link below to give you a better idea.
Hope you get it sorted out.
http://pondini.org/TM/14.html -
Centre button is not working properly in my iphone . . what can i do for that ?
centre button is not working properly in my iphone . . what can i do for that ?
Get it serviced.
-
hi even when i connect my macbook and apple tv to the same wifi network i cant put on the air play mirroring option.my airplay mirroring option does not detect any device.what can i do for this?
See
http://support.apple.com/kb/TS4215 -
I installed Mac OSX Snow Leopard 10.6.3 And now my Java is not working,what can I do to fix's this?
Run Software Update to get to 10.6.8 and update Java.
-
i upgraded my iphone os to 4.01 and i have not been able to sync to my computer. The error message I get says the Iphone connected is not recognised what can i do to solve this problem.
Did you try to connect in recovery mode? iOS: Unable to update or restore
Also check here: iOS: Device not recognized in iTunes for Windows
And make sure your security software is set up right: iTunes for Windows: Troubleshooting security software issues
Maybe you are looking for
-
Photoshop CS4 corrupted file while save to server
Hello We have or Leopard OS X Server running for months. Running CS3 Clients on 10.4.11 without any problems. A couple of weeks ago we swapped to 10.5 Clients and all Photoshop where corrupted when using "save", the "save as" works fine. After some d
-
I TUNES 8 REFUSES TO IMPORT ANY VIDEO !!!
Please can somebody help - I used to be able to import mp4 videos converted with toast or isquint into itunes with no problem but it won't work with itunes 8 . If I try dragging the video files to my library they just 'bounce' back - have tried the i
-
HT201272 Can't find my season of breaking bad in the cloud...help?
Trying to download my purchases from iTunes onto iPad from iCloud, but some of my purchases aren't showing up. Any advice?
-
Migration from SQL Server 7.0 to Oracle 8.0.5
Can we migrate from SQL Server 7.0 to Oracle 8.0.5 directly without being converted to Oracle 8i objects
-
Metadata conversion in order to restore address in addressbook.
Dear Sir, While syncing my iPhone, somehow, I lost the addresses in my emac adressbook and instead of merging the addresses got reduced from 869 to 195!!!!! Attempted to do the following: 1. Mobile me addresses not found there because of the automati