View unanswered posts | View active topics It is currently Mon Oct 23, 2017 7:07 pm



Reply to topic  [ 3 posts ] 
 Extractor filter regex 
Author Message

Joined: Fri Feb 15, 2013 10:06 am
Posts: 7
Reply with quote
Post Extractor filter regex
Hello,

I am trying to set up a custom filter for a C++ MFC project to skip trace debug lines. I'm using ECMA Scrip syntax, but the filter has no effect. Where is the documentation that describes the settings for filter properties? Here is my regex:

\bTRACE[0-9]{0,2}\s*\(.*\).*;

I'm trying to ignore statements like this:

TRACE("AIRCRAFT: %s\n", pParameters->GetName());

I verified it in a regex tester and it matches all the strings that I am looking for. After I created the filter I re-scanned the project but it doesn't filter out the strings. It is enabled. I am using version 2.0.7956.

Thank you.


Attachments:
File comment: screen shot of my filter settings
LingobitRegexFilter.png
LingobitRegexFilter.png [ 35.26 KiB | Viewed 6829 times ]
Fri Feb 15, 2013 10:24 am
Profile

Joined: Fri Feb 15, 2013 10:06 am
Posts: 7
Reply with quote
Post Re: Extractor filter regex
OK I got something working. It appears the regex I was using is only applied to the actual strings. I had to remove it and use regex in the context surrounding the strings.


Fri Feb 15, 2013 12:42 pm
Profile

Joined: Tue Feb 10, 2009 3:45 am
Posts: 52
Reply with quote
Post Re: Extractor filter regex
Hello! Then you should use "Context filter". You can choose appropriate mode in "String context condition group".
I think, you don't need to use regex. Just check text before string suffix. In your case I recommend following:
1. Set "String content condition" mode to "Do not check content";
2. Set "String context condition" mode to "Text before suffix and text after prefix match";
3. Set "Text before the string" to "TRACE(".

Regards, Peter


Sun May 18, 2014 1:39 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Software Localization Tool - Lingobit Localizer