Poll
Question:
Please change
Option 1: ReplaceInFiles
votes: 0
Option 2: EditorManager
votes: 0
In File: sdk/editormanager.cpp
In Function: int EditorManager::ReplaceInFiles(cbFindReplaceData* data)
From:
fileContents = cbReadFileContents(file, def_encoding);
if (fileContents.Find(data->findText) == -1)
{
continue;
}
To:
fileContents = cbReadFileContents(file, def_encoding);
if(!data->regEx)
{
if (fileContents.Find(data->findText) == -1)
{
continue;
}
}else if( AdvRegex && re.Matches(fileContents)==0)
{
continue;
}
Quote from: vmlobanov78 on February 12, 2012, 04:27:08 AM
In File: sdk/editormanager.cpp
In Function: int EditorManager::ReplaceInFiles(cbFindReplaceData* data)
I don't understand what you are trying to tell...?!
Can you please explain what you show here and not just post code snippets?
Is regular expression replace in files broken?
Quote from: ptDev on February 12, 2012, 10:21:01 AM
Is regular expression replace in files broken?
Yes.
I'm from Russia. I don't speak English.
First code ("From") place - string number ~ 1980-1990 in file
sdk/editormanager.cpp
Can you tell us, what you expect and what does not work.
When I want to do "Replace in files" with options: "Regular expression" and scope "Projects files" or "Workspace files"
In closed files does not result.
Because:
fileContents.Find(data->findText) == -1
with "RegExp" can produce results "true"