java - Need a regular expression for a spreadsheet calculator -


i'm building calculator can operate on cells in spreadsheet, , need regular expression part of it.

what need parse out following:

  • digits: integers.
  • cell names: named 'alpha character' + 'digit' ie. a1, b2...
  • operations: +, -, *, /

an example like:

23 a4 * 2 b5 /   

here want groups be: 23, a4, *, 2, b5, /

it shouldn't tough, operations throw me off.

the reason wanting regex , not splitting on spaces validation. i'm looking specific things, thought regex best thing use.

here want groups be: 23, a4, *, 2, b5, /

string[] groups = "23 a4 * 2 b5 / ".split(" "); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -