Filter issue, difference between search and copy?

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

Post Reply
rex1701
Junior Member
Junior Member
Posts: 3
Joined: 2011-02-21, 13:10 UTC

Filter issue, difference between search and copy?

Post by *rex1701 » 2017-01-20, 12:06 UTC

Hi

I have found a problem where I can search for, but not use as a copy filter:

files: *.xml,
in the period: 1/10/2016-31/12-2016,
containing: <tumor>\n <rbt_indikator>Ja

I also seem unable to extend the filter with an OR:
<tumor>\n <rbt_indikator>Ja|<blodsygdom>\n <rbt_indikator>Ja

Regards

User avatar
sqa_wizard
Power Member
Power Member
Posts: 3395
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard » 2017-01-20, 21:37 UTC

containing: <tumor>\n <rbt_indikator>Ja
What do you mean with "\n"? New line? Bad guess!
TC Help wrote:\n Finds subexpression n another time in the search result
Just press the button at search dialog and click the link to "regular expressions" to see all possible notations.
#5767 Personal license

User avatar
Stefan2
Power Member
Power Member
Posts: 2211
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 » 2017-01-20, 21:52 UTC

Just to be clear:

A literary '\n' stands for a new line in C-like programming languages.

sqa_wizard wrote:
TC Help wrote:\n Finds subexpression n another time in the search result
The help doesn't means the letter 'n' literary,
here the 'n' stands for 'number' like '1' or '2' to represents the n'th (...)-Subexpression

See example on next line in help.

Backreferences

\n Finds subexpression n another time in the search result.
Example: (.+)\1+ finds e.g. abab (where the first ab is found by .+ and the second by \1+ )







 

User avatar
MVV
Power Member
Power Member
Posts: 8145
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2017-01-20, 23:00 UTC

Meanwhile it really looks like a bug: TC filters files with search preset that finds some text in files but not when this text contains \n character.
rex1701 wrote:I also seem unable to extend the filter with an OR
You just can't do that using find text field. Normal text search only supports single search pattern. Regex text search does support multiple search patterns separated with pipe (|), but regex search works only within separate lines, you can't search for multiline pattern. However you can find multiple patterns (combined with AND or OR operators) using plugins tab and some WDX plugin that returns full file text.

Post Reply