This appears to have been posted to Meditations, but I'm not sure if you meant it to be a question? Anyway, you're describing scanning a string looking for a pattern, which is exactly what regular expressions are good at. Ignoring the duplicate 1's, there are only 29 Fibonacci numbers with 1 to 6 digits, a regex can handle that just fine (and it would have no problem handling much more). See Building Regex Alternations Dynamically.
Update: You appear to have edited your node to remove its content, please see How do I change/delete my post? for why you shouldn't do that. Content restored, thanks Athanasius. Also made very minor fixups.
In reply to Re: Read file text and find fibonacci series
by haukex
in thread Read file text and find fibonacci series
by darkblackblue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |