detect integer next to any character java | SoloLearn: Learn to code for FREE!

0

detect integer next to any character java

I want a possible way to detect int next to any character or string. for example 88+34 I want my code to detect and use 34 as it is the next integer to + sign. How is it possible?

9/24/2018 6:19:51 PM

Rifat Bin Salam

1 Answer

New Answer

0

Use a Regular Expression which matches a non-digit followed by one or more digits, then return the digits. The actual expression varies a little with language, but will be similar to /[^\d](\d+)/.