You can use [: digit:] in place of [0-9], and [: alpha:] is a more portable replacement for [-a-za-z0-9_]. For example, you can strip all punctuation from a string by using the statement.
您可以使用[:digit:]代替[0 - 9],并且[:alpha:]是比[-a - zA - z0 - 9 _]更具有可移植性的替代者。
You can use [: digit:] in place of [0-9], and [: alpha:] is a more portable replacement for [-a-za-z0-9_]. For example, you can strip all punctuation from a string by using the statement.
您可以使用[:digit:]代替[0 - 9],并且[:alpha:]是比[-a - zA - z0 - 9 _]更具有可移植性的替代者。
应用推荐