我想查找一个字符串是否包含“Are”、“Ate”、“Aste”或“Anche”之类的内容,例如 string.contains("A%e")。
java的表达方式:
从员工中选择名字,其中名字类似于“A%e”;
谢谢
最佳答案
使用正则表达式。例如:
"Aste".matches("A.*e")
关于java - java中有一种方法可以将%(sql)放入其中。像这样 "select first_name from employees where first_name like ' A%e'”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53450180/