regexes for parsing formatted numbers

后端 未结 3 1527
后悔当初
后悔当初 2021-01-22 13:00

I am parsing documents which contain large amounts of formatted numbers, an example being:

 Frc consts  --     1.4362                 1.4362                 5.41         


        
3条回答
  •  囚心锁ツ
    2021-01-22 13:40

    It is only a partial answer but I was alerted to Scanner in Java 1.5 which can scan text and interpret numbers which gives a BNF for the numbers that can be scanned and interpreted by this Java utility. In principle I imagine the BNF could be used to construct a regex.

提交回复
热议问题