AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

RegExpr to detect integers

Ein Thema von WojTec · begonnen am 16. Apr 2015 · letzter Beitrag vom 17. Apr 2015
 
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#1

RegExpr to detect integers

  Alt 16. Apr 2015, 11:24
Hi, I'm not sure is valid place for this question... But...

I want to extract numbers from string and Iactually did it with RegExpr. I have routines for floats and floats with unit (for data size, transfer speed and bandwidth). Floats look to be more complicated, but because there are more complicated it's easier to implement. For integers I have this:

Code:
[-+]?\d+

So, this can extract digits, not numbers, for example it returns "1.23" as "1" and "23", but should retun nothing (this is not integer, but float value). How it should be to recognize integers and do not split floats?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz