Skip to content

Commit 2e1eb25

Browse files
author
jef
committedOct 14, 2009

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/core/qgssearchtreenode.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ bool QgsSearchTreeNode::checkAgainst( const QgsFieldMap& fields, const QgsAttrib
251251
case opRegexp:
252252
case opLike:
253253
{
254-
if ( !getValue( value1, mLeft, fields, attributes ) || !getValue( value2, mRight, fields, attributes ) )
254+
if ( !getValue( value1, mLeft, fields, attributes ) ||
255+
!getValue( value2, mRight, fields, attributes ) )
255256
return false;
256257

257258
// value1 is string to be matched
@@ -274,10 +275,10 @@ bool QgsSearchTreeNode::checkAgainst( const QgsFieldMap& fields, const QgsAttrib
274275
}
275276

276277
QRegExp re( str );
277-
res = re.indexIn( value1.string() );
278+
res = re.exactMatch( value1.string() );
278279
QgsDebugMsgLevel( "REGEXP: " + str + " ~ " + value2.string(), 2 );
279280
QgsDebugMsgLevel( " res: " + res, 2 );
280-
return ( res != -1 );
281+
return res;
281282
}
282283

283284
default:

0 commit comments

Comments
 (0)
Please sign in to comment.