[英]How to find something between a String and two dots?
I´m trying to get out some value inside a text with regex. 我正试图从正则表达式的文本中获取一些价值。
Text example: 文字范例:
COMISION 002...................50.00........15.060000...............753.00 IVA 21 % 委员会002 ................... 50.00 ........ 15.060000 ...... 753.00 IVA 21%
I would like to get: 753.00 我想要得到:753.00
I´m using this regex: 我正在使用此正则表达式:
Pattern pattern = Pattern.compile("(?<=\\.\\.)(.*)(?=IVA 21 %)");
The problem is that this regex is outputting: 问题是此正则表达式正在输出:
.................50.00........15.060000...............753.00 ................. 50.00 ........ 15.060000 ............... 753.00
So I assume that the first time the engine finds the two dots (..) sets a limit. 因此,我假设引擎首次发现两个点(..)会设置一个限制。
What I want and can´t resolve is something like: "find the words "IVA 21 %", then look back and bring me all of the data till you see two dots together" 我要解决的问题是:“找到“ IVA 21%”,然后回头带给我所有数据,直到一起看到两个点”
I´m new in the regex world so any help is appreciate. 我是regex世界中的新人,因此对您的帮助是不胜感激的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.