English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm trying to take numbers from a web page and perform math on them. This means I have to separate them from words.

2006-06-28 11:29:06 · 3 answers · asked by realsaltlakesoccer 1 in Computers & Internet Programming & Design

3 answers

I think this is what you are looking for.

2006-06-28 11:57:45 · answer #1 · answered by AnalProgrammer 7 · 0 0

I easily have an previous internet web site which will be of a few help. it really is not any longer in any of the above languages, yet rather in uncomplicated. besides the undeniable fact that it is going step through step through lexing and parsing for a calculator and similar concepts would artwork effective in different languages, consisting of C++ and C#, as a segue. See less than. the elementary concept is to handle the enter as a itemizing of unmarried characters and to save music of the position you're in that list as you study it. so that you'll look on the first personality, as an instance, and note that it really is a digit 4 and confirm to bypass search for further digits, possibly, to determine out the finished huge type in contact. then you definately would convert the '4' (and the different digits) right into a numeric variable as a cost 4. (each and each language has diverse options of doing that, yet when you're compelled to do it "the confusing way" you could continually commence out a cost as 0 and then multiply it through 10 for each digit you get and upload in the digit till there are not any extra digits and deal with decimal factors fantastically etc. convinced, that on my own can take a touch code to attain nicely.) yet a minimum of have a glance. It encompasses a parser for algebraic syntax, to boot, consisting of parentheses.

2016-11-15 09:32:29 · answer #2 · answered by ? 4 · 0 0

http://www.cs.tut.fi/~jkorpela/HTML3.2/4.5.html

2006-06-28 12:04:36 · answer #3 · answered by utchudie 1 · 0 0

fedest.com, questions and answers