🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #16197

Re: Preguntillas C y Linux.

#16197
From: batsman
Date: Mon, 01 May 2000 00:00
73 lines
3427 bytes
-----BEGIN PGP SIGNED MESSAGE-----


  >> El Sun, 30 Apr 2000 17:04:58 +0200, el siguiente flujo de bytes sali�
  >> del ordenador de Santiago Romero hacia es.comp.os.linux.programacion:

>
> Enaasssssss yo sigo con mi checkmail y tengo algunas preguntillas...
>
> o �Hay una funci�n similar a strstr() pero que sea case insensitive?

�no? De todas formas puedes usar las funciones de regexp para ello, usando el
flag REG_ICASE (m�s info abajo).

> o Dada una expresi�n regular y una cadena de caracteres... �como puedo
>   evaluar dicha expresi�n regular sobre la cadena para ver si la
>   cumple o no?

man regcomp

regcomp(3)                     GNU                     regcomp(3)

NAME
       regcomp,  regexec,  regerror,  regfree - POSIX regex func�
       tions

       SYNOPSIS
       #include <regex.h>

       int regcomp(regex_t *preg, const char *regex, int cflags);
       int regexec(const   regex_t  *preg,  const char  *string,
       		   size_t  nmatch, regmatch_t   pmatch[], 
		   int eflags);
       size_t regerror(int  errcode,  const  regex_t  *preg, char
       		       *errbuf, size_t errbuf_size);
       void regfree(regex_t *preg);
				     

> o �se puede aplicar el anterior m�todo a un vector con muchas
>   l�neas (separadas por \n) y que me diga si alguna de dichas
>   l�neas lo cumple? (no es un vector de l�neas sino un vector
>   con varias lineas, que es diferente, si no haria un bucle).

S�.

Por cierto, �qu� es lo que hace el checkmail ese?
A ver si lo adivino:
 - por el nombre: una especie de xbiff
 - por las regexp: avisa cuando te llega un mensaje de alguien en particular

�He acertado?
- -- 
              _           _                             
             | |__   __ _| |_ ___ _ __ ___   __ _ _ __  
             | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
             | |_) | (_| | |_\__ \ | | | | | (_| | | | |
             |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|

             Real email: batsman dot geo at yahoo dot com

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Public key via email: send mail with Subject: [PGPKEY]

iQEVAwUBOQ1AWL0Y27yr0iefAQHKoAf/XcKa6u0Ok2wM/hKKwXUtTlE7HRobsE+P
DNkJCsCt7CjT+Av08N5m1FaAji/kOvIXeeaxySMc8OCFHWoYZA2O/F1giq5Uc/Rp
d80ngWjj1wITBDymHzGW8zUnR9ziXPD0QxeATYbb+0ttCSp/OocnBujAh8dku4YB
0YH5JfvEoEm87Bcvn44WXmclkqm4AkLluB/mUXOxhodtmwo3c64cjIBxJhFdyjup
FJ3G/whMFVo266MLSFOA+vcasiFY1wn+wf/xe3eWX6aZrc3ojMdYVTcebm94ZaEd
9nUxBMu9SMIP2AdruGwXABB7TEYR/87OIqMIJzOO4I6sb6JMllJYCA==
=/qWD
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <t8fje8.ie.ln@simpsons4ever>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8goisq.33m.nop@compiler.linux.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,21477be2e2f46d7
X-Google-Attributes: gidf86c8,public
From: batsman@simpsons.for.ever (batsman)
Subject: Re: Preguntillas C y Linux.
Date: 2000/05/01
Message-ID: <t8fje8.ie.ln@simpsons4ever>
X-Deja-AN: 617754105
Content-Transfer-Encoding: 8bit
References: <slrn8goisq.33m.nop@compiler.linux.es>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@news.wanadoo.es
X-Trace: m2newsread.uni2.es 957162778 62.36.7.95 (Mon, 01 May 2000 08:32:58 MET DST)
Organization: Wanadoo Usenet News - Visita http://www.wanadoo.es/
Mime-Version: 1.0
User-Agent: slrn/0.9.5.3 (UNIX)
Reply-To: see_signature-mira_firma
NNTP-Posting-Date: Mon, 01 May 2000 08:32:58 MET DST
Newsgroups: es.comp.os.linux.programacion