我正试图为"以a开头、以b结尾的a和b数量相等的字符串"找到正则表达式。
以下是我所做的:https://regex101.com/r/6sEGqm/1/
如果您不需要涵盖abbaab
这样的情况,那么您可以使用
/^(?:ab)+?$/
我正试图为"以a开头、以b结尾的a和b数量相等的字符串"找到正则表达式。
以下是我所做的:https://regex101.com/r/6sEGqm/1/
如果您不需要涵盖abbaab
这样的情况,那么您可以使用
/^(?:ab)+?$/
javascript python java c# php android html jquery c++ css ios sql mysql arrays asp.net json python-3.x ruby-on-rails .net sql-server django objective-c excel regex ruby linux ajax iphone xml vba spring asp.net-mvc database wordpress string postgresql wpf windows xcode bash git oracle list vb.net multithreading eclipse algorithm macos powershell visual-studio image forms numpy scala function api selenium