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.
我在将 MySQL 查询中的字符串与以下正则表达式匹配时遇到问题:
我希望它匹配这个字符串:“Rue de l' Harmonie”
SELECT id, street_name FROM street_names WHERE street_name REGEXP '^(rue[a-z]+[[:blank:]])((du|de|la|des|d[\']|l[\'])[[:blank:]])*[[:<:]]HARMONIE$'
任何人都可以给我一个提示?
开头:
^(rue[a-z]+
+要求至少有一个 az char 直接跟在rue之后。你可能想要*.
+
*