Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想对 textBox 进行检查的金额为*.xxx形式
if( mnt == null || !mnt.matches("^\\d*$.\\d{3}") ){ //bla-bla-bla }
请问有什么帮助吗?谢谢。
也许^\\d*\\.\\d{3}$?
^\\d*\\.\\d{3}$
放在$最后,并对.角色使用转义。
$
.