---
url: 'https://metadrop.net/es/articulos/guia-rapida-de-expresiones-regurales-regex'
title: 'Guía rápida de expresiones regurales "regex".'
author: 'Jorge Tutor'
date: '2017-01-17T10:32:54+00:00'
updated: '2026-08-04T07:53:36+00:00'
type: article
summary: 'Guía rápida de expresiones regurales.'
tags:
  - PHP
  - preg_match
  - RegEx
published: true
og:
  determiner: Automatic
  site_name: Metadrop
  'image:alt': 'Guía rápida de expresiones regurales "regex".'
  street_address: 'Calle Manuel Luna, 12, 3 Dcha'
  locality: Madrid
  region: Madrid
  postal_code: '28020'
  country_name: España
  email: hola@metadrop.net
  phone_number: '910053180'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': Article
      '@id': 'https://metadrop.net/es/articulos/guia-rapida-de-expresiones-regurales-regex#article'
      name: 'Guía rápida de expresiones regurales "regex".'
      headline: 'Guía rápida de expresiones regurales "regex".'
      description: 'Guía rápida de expresiones regurales.'
      about:
        - PHP
        - preg_match
        - RegEx
      datePublished: '2013-08-09T11:00:00+0200'
      dateModified: '2026-08-04T09:53:36+0200'
      author:
        '@type': Person
        name: 'Jorge Tutor'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
      mainEntityOfPage: 'https://metadrop.net/es/articulos/guia-rapida-de-expresiones-regurales-regex'
    -
      '@type': Organization
      '@id': 'https://metadrop.net/#organization'
      url: 'https://metadrop.net/'
      name: Metadrop
      sameAs:
        - 'https://www.drupal.org/metadrop'
        - 'https://twitter.com/metadrop'
        - 'https://asociaciondrupal.es/partner/metadrop'
        - 'https://www.linkedin.com/company/metadrop'
      logo:
        '@type': ImageObject
        url: 'https://metadrop.net/themes/custom/mdrop_radix/logo-metadrop-500-500.jpg'
        width: '500'
        height: '500'
    -
      '@type': ItemPage
      '@id': 'https://metadrop.net/es/articulos/guia-rapida-de-expresiones-regurales-regex'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Inicio
            item: 'https://metadrop.net/es'
          -
            '@type': ListItem
            position: 2
            name: 'Artículos expertos sobre Drupal y tecnología'
            item: 'https://metadrop.net/es/articulos'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
---
 1. [Artículos](https://metadrop.net/es/articulos)
 
  

# Guía rápida de expresiones regurales "regex".

Viernes 09 de Agosto de 2013

 

 



Guía rápida de expresiones regurales.



   



```php
Simple regex
 
Regex quick reference
[abc]     A single character: a, b or c
[^abc]     Any single character but a, b, or c
[a-z]     Any single character in the range a-z
[a-zA-Z]     Any single character in the range a-z or A-Z
^     Start of line
$     End of line
\A     Start of string
\z     End of string
.     Any single character
\s     Any whitespace character
\S     Any non-whitespace character
\d     Any digit
\D     Any non-digit
\w     Any word character (letter, number, underscore)
\W     Any non-word character
\b     Any word boundary character
(...)     Capture everything enclosed
(a|b)     a or b
a?     Zero or one of a
a*     Zero or more of a
a+     One or more of a
a{3}     Exactly 3 of a
a{3,}     3 or more of a
a{3,6}     Between 3 and 6 of a
 
options: i case insensitive m make dot match newlines x ignore whitespace in regex o perform #{...} substitutions only once
```

Existen herramientas online para comprobar expresiones regulares, sin duda una de las mejores [https://regex101.com](https://regex101.com "regex101 site").



[PHP](https://metadrop.net/es/articulos?text=PHP)

[preg\_match](https://metadrop.net/es/articulos?text=preg_match)

[RegEx](https://metadrop.net/es/articulos?text=RegEx)

 

- Jorge Tutor
    
    CIO