[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisiónAmbos lados, revisión siguiente
es:howtos:general_admin:cli_constructs_and_useful_info [2019/02/07 19:41 (UTC)] – [Construye] slackwarespanoles:howtos:general_admin:cli_constructs_and_useful_info [2019/02/07 19:53 (UTC)] – [Regular expressions] slackwarespanol
Línea 151: Línea 151:
 === Enlaces externos === === Enlaces externos ===
   * http://www.grymoire.com/Unix/Quote.html   * http://www.grymoire.com/Unix/Quote.html
-==== Regular expressions ==== +==== Expresiones regulares ==== 
-=== Basic === +=== Básico === 
-  * ''.'' matches any single character+  * ''. '' coincide con cualquier carácter individual
-  * ''\'' escapes the next character+   * '' \ '' evita del siguiente carácter
-<note>Remember to escape the ''.'' using ''\.'' if you want an actual ''.''+<note>Recuerde que debe evitar ''. '' usando '' \. '' Si quieres un verdadero ''. ''
 <code> <code>
 bash-4.2$ cat test.txt  bash-4.2$ cat test.txt 
Línea 167: Línea 167:
 test test
 </code></note> </code></note>
-  * ''[]'' is a class and matches anything inside the brakets for a single characterExamples:  +  
-    * ''[Yy]'' matches or y. +  * '' [ ] '' es una clase y combina cualquier cosa dentro de los corchetes para un solo personajeEjemplos  
-    * ''[a-z0-9]'' includes a rangeand in this case matches through and through 9. +    * '' [Yy] '' coincide con y.  
-    * ''[^a-z]'' negates the rangeso in this case it matches anything but through z. +    * '' [a-z0-9] '' incluye un rangoy en este caso coincide con a través de y de 9.  
-  * ''^'' matches the beginning of a lineExample: ''^a'' matches an a at the beginning of line+    * '' [^ a-z] '' niega el rangopor lo que, en este caso, se ajusta a cualquier cosa excepto a a z.  
-  * ''$'' matches the end of a lineExample: ''a$'' matches an a at the end of line+  * '' ^ '' coincide con el principio de una líneaEjemplo: '' ^ a '' coincide con una al principio de una línea.  
-  * ''\<'' matches the beginning of a wordExample: ''\<a'' matches an a at the beginning of word+  * '' $ '' coincide con el final de una líneaEjemplo: '' a $ '' coincide con una al final de una línea.  
-  * ''\>'' matches the end of a wordExample: ''a\>'' matches an at the end of a word+  * '' \ <'' coincide con el principio de una palabraEjemplo: '' \ <a '' coincide con una al principio de una palabra.  
-    Example: ''\<[tT]he\>'' matches the word ''the'' or ''The''+  * '' \> '' coincide con el final de una palabraEjemplo: '' a \> '' coincide con una al final de una palabra.  
-  * ''*'' matches any number of the previous character or nothing no characterExample: ''[0-9]*'' which will match any number of numbers. ''.*'' matches any number of anything.+   Ejemplo: '' \ <[tT] he \> '' coincide con la palabra '' el '' '' El ''   
 +  * '' * '' coincide con cualquier número del carácter anterior o nada ningún carácterEjemplo: '' [0-9] * '' que coincidirá con cualquier número de números. ''. * '' coincide con cualquier número de cualquier cosa.
 === Extended regular expressions === === Extended regular expressions ===
 The following must be supported by the program for them to work. For example for grep you must run ''egrep'' or ''grep -E''. The following must be supported by the program for them to work. For example for grep you must run ''egrep'' or ''grep -E''.
 es:howtos:general_admin:cli_constructs_and_useful_info ()