Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Search/Find in Files    [ Add a report in this area ]  
Report #:  70261   Status: Closed
[Regression] Regular expressions result representation differs from "Find" representation in editor
Project:  Delphi Build #:  12.0.3210.17555
Version:    12.1 Submitted By:   Uwe Schuster
Report Type:  Minor failure / Design problem Date Reported:  1/4/2009 9:22:51 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   267517
Resolution: Fixed (Resolution Comments) Resolved in Build: : 12.0.3298.19003
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 2
Some days ago I replaced 2008 by 2009 in the JVCS copyright string. I thought afterwards "How could I find 2008 occurrences in strings?" (just searching for 2008 would find almost only comments). I tried regular expressions, that worked, but I didn't understand how "Find in Files" highlights the results. I compared it with RAD Studio 2007, noticed that there it is highlighted as expected and so this is regression.

-> see steps and attached pictures
Steps to Reproduce:
0. start Delphi 2009
1. create a new Delphi Win32 console application
    (or use the attached file FindInFilesRegExTest.dpr and go to step 3.)
2. paste the following code into the project source

  cProductInf = ' © 2002-2008 JEDI VCS ( - ';

  SomeTextConst1 = 'program begin something end';
  SomeTextConst2 = 'begin something end';
  SomeTextConst3 = 'beginsomethingend';

3. search with "Find" for




  (enable [x] Regular expressions!)

expected: the whole string of the constant cProductInf is selected
actual: as expected

4. do the same with "Find in Files"

expected: the whole string of the constant cProductInf is bold
- with '.*2008.*' is the part "2002-2" bold
  (html like -> ...cProductInf = ' © <b>2002-2</b>008 JEDI VCS...)
  see FiF2008V1Results.png for the result with Delphi 2009 and RAD Studio 2007

- with '{.*}2008{.*}' is the part "2002-2008" bold
  (html like -> ...cProductInf = ' © <b>2002-2008</b> JEDI VCS...)
  see FiF2008V2Results.png

5. repeat 3. and 4. with the following expressions and compare the
results of 3. and 4.


-> results see FiFBeginEndV1Results.png

-> results see FiFBeginEndV2Results.png

-> results see FiFBeginEndV3Results.png


Server Response from: ETNACODE01