怎么样:
* //Ignore everything
!*[!0-9.]* //Except things with some characters besides numbers (and period, for decimals) in them
!*.*.* //And except things with two periods, since these can't be numbers
Run Code Online (Sandbox Code Playgroud)
请注意,这些是 shell globs 而不是正则表达式。