diff --git a/src/selector/selector.js b/src/selector/selector.js index e9e859e0..08b64066 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -312,13 +312,13 @@ jQuery.extend({ var m = re.exec( t ); if ( m ) { + // Remove what we just matched + t = t.substring( m[0].length ); + // Re-organize the first match if ( jQuery.expr[ m[1] ]._resort ) m = jQuery.expr[ m[1] ]._resort( m ); - // Remove what we just matched - t = t.replace( re, "" ); - break; } }