Forum: Algorithmen, Datenstrukturen und Klassendesign
Delphi
by Der schöne Günther,
16. Apr 2015
I'm no expert when it comes to regular expressions, but I suppose a "negative lookbehind" could do the trick. I tried, but the Delphi TRegex complained that the negative lookbehind was not of a fixed length (how could it?).
I guess it's way easier to just fetch all floats via regular expressions, then use code to see whether it fits into an integer or not.
Like this: program Project26;
...
Forum: Algorithmen, Datenstrukturen und Klassendesign
Delphi
by Der schöne Günther,
16. Apr 2015
I've come to love
https://regex101.com/
and
http://www.regexr.com/
The latter lists /(?:\d*\.)?\d+/ig for parsing floats. You can find it at examples -> integer & decimal numbers.