小编lap*_*and的帖子

Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal character range near index 9

I want to match alphanumeric words separated by the operators, +, -, *, /, <, > and ending with a semicolon. There can be whitespace characters in between e.g. the following strings should return true:

first + second;
first - second;
first * second;
first / second;
first;
first + second < third;
third < second * first;
Run Code Online (Sandbox Code Playgroud)

This is what I have tried:

first + second;
first - second;
first * second;
first / second;
first;
first + …
Run Code Online (Sandbox Code Playgroud)

java regex string

1
推荐指数
1
解决办法
122
查看次数

标签 统计

java ×1

regex ×1

string ×1