Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 12-10-2006
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 29
Lepe Va por buen camino
roman: supongo que conoces la unidad ConvUtils.pas, donde se puede crear conversiones entre unidades de medida, pesos, etc. Pues juraría que he visto la misma filosofía con expresiones regulares en Delphi 6 hace un par de años, lo encontré de pasada y no entendí la filosofía de uso, así que lo descarté.

Usando el Grep Search de GExpert he obtenido algunas cosas:

En BDS 2006 en la unidad Nsapi.pas, solo he podido encontrar esto:
Código Delphi [-]
{*****************************************************************************}
{* From shexp.h                                                               }
{*****************************************************************************}
{
  Defines and prototypes for shell exp. match routines


  This routine will match a string with a shell expression. The expressions
  accepted are based loosely on the expressions accepted by zsh.

  o * matches anything
  o ? matches one character
  o \ will escape a special character
  o $ matches the end of the string
  o [abc] matches one occurence of a, b, or c. The only character that needs
          to be escaped in this is ], all others are not special.
  o [a-z] matches any character between a and z
  o [^az] matches any character except a or z
  o ~ followed by another shell expression will remove any pattern
      matching the shell expression from the match list
  o (foo|bar) will match either the substring foo, or the substring bar.
              These can be shell expressions as well.

  The public interface to these routines is documented below.
}

{* --------------------------- Public routines ---------------------------- *}

{
  shexp_valid takes a shell expression exp as input. It returns:

   NON_SXP      if exp is a standard string
   INVALID_SXP  if exp is a shell expression, but invalid
   VALID_SXP    if exp is a valid shell expression
}

const
   NON_SXP = -1;
   INVALID_SXP = -2;
   VALID_SXP = 1;

{* and generic shexp/regexp versions *}
   NON_WILDPAT     = NON_SXP;
   INVALID_WILDPAT = INVALID_SXP;
   VALID_WILDPAT   = VALID_SXP;

{* and regexp versions *}
   NON_REGEXP      = NON_SXP;
   INVALID_REGEXP  = INVALID_SXP;
   VALID_REGEXP    = VALID_SXP;

function shexp_valid(exp: PChar): Integer; cdecl;

{
  shexp_match

  Takes a prevalidated shell expression exp, and a string str.

  Returns 0 on match and 1 on non-match.
}
function shexp_match(str, exp: PChar): Integer; cdecl;

{
  shexp_cmp

  Same as above, but validates the exp first. 0 on match, 1 on non-match,
  -1 on invalid exp. shexp_casecmp does the same thing but is case
  insensitive.
}
function shexp_cmp(str, exp: PChar): Integer; cdecl;
function shexp_casecmp(str, exp: PChar): Integer; cdecl;
****************************
function shexp_valid; external nshttp name 'shexp_valid';
function shexp_match; external nshttp name 'shexp_match';
function shexp_cmp; external nshttp name 'shexp_cmp';
function shexp_casecmp; external nshttp name 'shexp_casecmp';
****************************

En la unidad ToolsApi.pas he encontrado esto, aunque el prefijo "IOTA" me deja KO.
Código Delphi [-]
  IOTASearchOptions = interface(IUnknown)
    ['{D1766F8B-D915-11D2-A8C1-00C04FA32F53}']
    function GetCaseSensitive: Boolean;
    function GetDirection: TSearchDirection;
    function GetFromCursor: Boolean;
    function GetRegularExpression: Boolean;
    function GetSearchText: string;
    function GetWholeFile: Boolean;
    function GetWordBoundary: Boolean;
    procedure SetCaseSensitive(Value: Boolean);
    procedure SetDirection(Value: TSearchDirection);
    procedure SetFromCursor(Value: Boolean);
    procedure SetRegularExpression(Value: Boolean);
    procedure SetSearchText(const Value: string);
    procedure SetWholeFile(Value: Boolean);
    procedure SetWordBoundary(Value: Boolean);

    property CaseSensitive: Boolean read GetCaseSensitive write SetCaseSensitive;
    property Direction: TSearchDirection read GetDirection write SetDirection;
    property FromCursor: Boolean read GetFromCursor write SetFromCursor;
    property RegularExpression: Boolean read GetRegularExpression write SetRegularExpression;
    property SearchText: string read GetSearchText write SetSearchText;
    property WholeFile: Boolean read GetWholeFile write SetWholeFile;
    property WordBoundary: Boolean read GetWordBoundary write SetWordBoundary;
  end;

En dotNet\rtl\Borland.Vcl.Masks.pas tambien he encontrado cosas, pero en Delphi 6 no estará, que precisamente es donde recuerdo haberlo visto.

¿Podrías realizar algunas búsquedas en Delphi 6 para comprobar si existen lo que he encontrado? Gracias.

Saludos
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita
  #2  
Antiguo 12-10-2006
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Poder: 28
jachguate Va por buen camino
Cita:
Empezado por Lepe
En la unidad ToolsApi.pas he encontrado esto, aunque el prefijo "IOTA" me deja KO.
I => Interfaz
OTA => Open Tools API.

Estas cosas son útiles cuando te pones a jugar con la parte trasera del IDE de delphi..

La interfaz en cuestión es la que usas cuando queres hacer una búsqueda, que por cierto, tiene una opción (limitada) para buscar usando expresiones regulares, lo que no quiere decir que podas usarlas desde el lenguaje... es decir, en tus propios programas. Como ya ha dicho roman, para esto hay componentes y bibliotecas de terceros.

Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita
  #3  
Antiguo 13-10-2006
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 29
Lepe Va por buen camino
Menos mal, me parecía que Borland me insultaba IdiOTA
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita
  #4  
Antiguo 13-10-2006
Avatar de Ñuño Martínez
Ñuño Martínez Ñuño Martínez is offline
Moderador
 
Registrado: jul 2006
Ubicación: Ciudad Catedral, Españistán
Posts: 6.000
Poder: 25
Ñuño Martínez Tiene un aura espectacularÑuño Martínez Tiene un aura espectacular
Gracias a todos. Ya sepo varias cosas más.
Responder Con Cita
  #5  
Antiguo 13-10-2006
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.561
Poder: 25
egostar Va camino a la fama
Cita:
Empezado por Lepe
Menos mal, me parecía que Borland me insultaba IdiOTA
y si mejor lo vieras como id IOTA, algo que imagino muchos usamos al diseñar campos de base de datos.

Saludos
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Expresiones en QuickReport (Delphi 7) Carlos A Ortega Impresión 5 12-06-2007 11:55:09
expresiones regulares en sql jonmendi SQL 1 24-12-2004 15:28:39
Expresiones en QReport StartKill Impresión 4 31-05-2004 23:20:29
Expresiones matemáticas Pandre Varios 0 04-09-2003 01:43:49
Expresiones regulares roman Varios 1 18-08-2003 17:08:37


La franja horaria es GMT +2. Ahora son las 03:05:09.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi