src/Edit.c
static void  _EscapeWildcards(char* szFind2, LPCEDITFINDREPLACE lpefr)
{
  char szWildcardEscaped[FNDRPL_BUFFER] = { '\0' };
  int iSource = 0;
  int iDest = 0;

  lpefr->fuFlags |= SCFIND_REGEXP;

  while (szFind2[iSource] != '\0')
  {
    char c = szFind2[iSource];
    if (c == '*')
    {
      szWildcardEscaped[iDest++] = '.';
    }
    else if (c == '?')
    {
      c = '.';
    }
    else
    {
      if (c == '^' ||
        c == '$' ||
        c == '(' ||
        c == ')' ||
        c == '[' ||
        c == ']' ||
        c == '{' ||
        c == '}' ||
        c == '.' ||
        c == '+' ||
        c == '|' ||
        c == '\\')
      {
        szWildcardEscaped[iDest++] = '\\';
      }
    }
    szWildcardEscaped[iDest++] = c;
    iSource++;
  }

  szWildcardEscaped[iDest] = '\0';

  StringCchCopyNA(szFind2, FNDRPL_BUFFER, szWildcardEscaped, COUNTOF(szWildcardEscaped));
}
// Wildcard search uses the regexp engine to perform a simple search with * ? as wildcards 
// instead of more advanced and user-unfriendly regexp syntax
// for speed, we only need POSIX syntax here

Wildcard search uses the regexp engine to perform a simple search with * . as wildcards
instead of more advanced and user-unfriendly regexp syntax
for speed, we only need POSIX syntax here
Wildcard search uses the regexp engine to perform a simple search with * . as wildcards instead of more advanced and user - unfriendly regexp syntax for speed we only need POSIX syntax here
static void  _EscapeWildcards(char* szFind2, LPCEDITFINDREPLACE lpefr)
{
  char szWildcardEscaped[FNDRPL_BUFFER] = { '\0' };
  int iSource = 0;
  int iDest = 0;
  lpefr->fuFlags |= SCFIND_REGEXP;
  while (szFind2[iSource] != '\0')
  {
    char c = szFind2[iSource];
    if (c == '*')
    {
      szWildcardEscaped[iDest++] = '.';
    }
    else if (c == '?')
    {
      c = '.';
    }
    else
    {
      if (c == '^' ||
        c == '$' ||
        c == '(' ||
        c == ')' ||
        c == '[' ||
        c == ']' ||
        c == '{' ||
        c == '}' ||
        c == '.' ||
        c == '+' ||
        c == '|' ||
        c == '\\')
      {
        szWildcardEscaped[iDest++] = '\\';
      }
    }
    szWildcardEscaped[iDest++] = c;
    iSource++;
  }
  szWildcardEscaped[iDest] = '\0';
  StringCchCopyNA(szFind2, FNDRPL_BUFFER, szWildcardEscaped, COUNTOF(szWildcardEscaped));
}
static void _EscapeWildcards ( char * szFind2 , LPCEDITFINDREPLACE lpefr ) { char szWildcardEscaped [ FNDRPL_BUFFER ] = { ' \0 ' } ; int iSource = 0 ; int iDest = 0 ; lpefr -> fuFlags |= SCFIND_REGEXP ; while ( szFind2 [ iSource ] != ' \0 ' ) { char c = szFind2 [ iSource ] ; if ( c == ' ' ) { szWildcardEscaped [ iDest ++ ] = ' ' ; } else if ( c == ' ' ) { c = ' ' ; } else { if ( c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' \\ ' ) { szWildcardEscaped [ iDest ++ ] = ' \\ ' ; } } szWildcardEscaped [ iDest ++ ] = c ; iSource ++ ; } szWildcardEscaped [ iDest ] = ' \0 ' ; StringCchCopyNA ( szFind2 , FNDRPL_BUFFER , szWildcardEscaped , COUNTOF ( szWildcardEscaped ) ) ; }
Wildcard search uses the regexp engine to perform a simple search with * ?
Wildcard search uses the regexp engine to perform a simple search with * ?