RegEx for Java中的字符串:
"stack overflow is awesome 200.00 "
我想只提取没有尾随空格的初始单词(仅stack overflow is awesome
)
我试过这个:
(^[\w\s]+ ?)([0-9]+\.[0-9]{1,2}?)\s{2,}$
但我得到的结果是
"stack overflow is awesome "
我只想要stack overflow is awesome
答案 0 :(得分:0)
答案 1 :(得分:0)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<canvas id="canvas">
This text is displayed if your browser does not support HTML5 Canvas.
</canvas>
输出:
[堆栈溢出很棒,200.00]