LimeSurvey Manual
Menu
Navigation
Main page
Recent changes
Random page
Help
Search
Special pages
Printable version
Recent changes
Help
English
Log in
Actions
Translate
Language statistics
Message group statistics
Export
Special
Export translations
Settings
Group
Activating a survey
Adding answers or subquestions
Administering LimeSurvey
Alternatives to the LimeSurvey import function
Assessments
Backup entire database
Batch deletion
Category:Advanced Question Settings
Category:General Question Options
Category:Question Settings
Central Participant Database
Changing an active survey
Check data integrity
Check question logic
Check survey logic - Advanced
Closing a survey
ComfortUpdate
Copy question
Custom translation
Data encryption
Data entry
Data policy settings
DateFunctions
Default answers
Delete question
Delete survey
Display/Export survey
Edit question
Email bounce tracking system
Email templates
Export question
Export responses
Exporting results
Expression Manager
Expression Manager sample surveys
ExpressionScript - Presentation
ExpressionScript Engine - Quick start guide
ExpressionScript examples
ExpressionScript How-tos
ExpressionScript sample surveys
Extension compatibility
Failed email notifications
First login - your user preferences
General FAQ
General settings
Getting started
Global settings
Google API howto
Home page settings
How to design a good survey (guide)
Import responses
Importing a survey
Installation - LimeSurvey CE
Installation FAQ
Installation of the LimeSurvey XAMPP package
Installation security hints
Installation using a command line interface (CLI)
Installation Version 1.92 or older
Iterate survey
Label sets
LDAP settings
License
LimeSurvey Manual
LimeSurvey PRO vs LimeSurvey CE
LimeSurvey Users
LimeSurvey Video-Tutorial
LimeSurvey-compatible hosting companies
List question groups
List questions
Localization
Major version upgrade
Make your plugin compatible with LS4
Manage user groups
Manage users
Menu configuration
Menu entries configuration
Multilingual survey
New Template System in LS3.x
Not categorized and advanced features
Notifications & data
Optional settings
Overview
Panel integration
Participant settings
Plugin manager
Plugin menu
Plugins - advanced
Presentation
Preview function
Problems & solutions
Publication & access
QS:Allowed filetypes
QS:Alphasort
QS:Answer width
QS:Array filter
QS:Array filter exclude
QS:Array filter style
QS:Assessment value
QS:Autocheck exclusive option
QS:Category separator
QS:Chart type
QS:Choice column width
QS:Choice header
QS:Code filter
QS:Commented checkbox
QS:CSS Class
QS:Date max
QS:Date min
QS:Date time format
QS:Display chart
QS:Display columns
QS:Display map
QS:Display rows
QS:Display type
QS:Dropdown dates
QS:Dropdown dates year max
QS:Dropdown dates year min
QS:Dropdown prefix
QS:Dropdown prepostfix
QS:Dropdown separators
QS:Dropdown size
QS:Dualscale headerA
QS:Dualscale headerB
QS:Em validation q
QS:Em validation q tip
QS:Em validation sq
QS:Em validation sq tip
QS:Encryption
QS:Equals num value
QS:Equation
QS:Exclusive option
QS:Get order previous q
QS:Hidden
QS:Hide tip
QS:Input box size
QS:Input boxes
QS:Input max characters
QS:Label column width
QS:Location city
QS:Location country
QS:Location defaultcoordinates
QS:Location mapheight
QS:Location mapservice
QS:Location mapwidth
QS:Location mapzoom
QS:Location nodefaultfromip
QS:Location postal
QS:Location state
QS:Mandatory
QS:Max answers
QS:Max filesize
QS:Max num value
QS:Max num value n
QS:Max num value sgqa
QS:Max subquestions
QS:Maximum chars
QS:Maximum number of files
QS:Min answers
QS:Min num value
QS:Min num value n
QS:Minimum number of files
QS:Minute step interval
QS:Month display style
QS:Multiflexible checkbox
QS:Multiflexible max
QS:Multiflexible min
QS:Multiflexible step
QS:Num value int only
QS:Numbers only
QS:Other
QS:Other comment mandatory
QS:Other numbers only
QS:Other Position
QS:Other replace text
QS:Page break
QS:Prefix
QS:Preg validation
QS:Printable survey relevance help
QS:Public statistics
QS:Question theme
QS:Random group
QS:Random order
QS:Rank header
QS:Relevance
QS:Remove text or uncheck checkbox
QS:Repeat headers
QS:Reverse
QS:Samechoiceheight
QS:Samelistheight
QS:Scale export
QS:Show comment
QS:Show grand total
QS:Show title
QS:Show totals
QS:Showpopups
QS:Slider accuracy
QS:Slider default
QS:Slider handle shape
QS:Slider handle Unicode shape
QS:Slider initial value
QS:Slider layout
QS:Slider max
QS:Slider middlestart
QS:Slider min
QS:Slider orientation
QS:Slider rating
QS:Slider reset
QS:Slider reverse
QS:Slider separator
QS:Slider showminmax
QS:Subquestion width
QS:Suffix
QS:Text input width
QS:Theme editor - advanced options
QS:Time limit
QS:Time limit action
QS:Time limit countdown message
QS:Time limit disable next
QS:Time limit disable prev
QS:Time limit message
QS:Time limit message delay
QS:Time limit message style
QS:Time limit timer style
QS:Time limit warning
QS:Time limit warning display time
QS:Time limit warning message
QS:Time limit warning style
QS:Use dropdown
QS:Value range allows missing
Question groups - introduction
Question toolbar options
Question type - 5 point choice
Question type - Array
Question type - Array (10 point choice)
Question type - Array (5 point choice)
Question type - Array (Increase-Same-Decrease)
Question type - Array (Numbers)
Question type - Array (Texts)
Question type - Array (Yes-No-Uncertain)
Question type - Array by column
Question type - Array dual scale
Question type - Date
Question type - Equation
Question type - File upload
Question type - Gender
Question type - Huge free text
Question type - Language switch
Question type - List (Dropdown)
Question type - List (Radio)
Question type - List with comment
Question type - Long free text
Question type - Multiple choice
Question type - Multiple choice with comments
Question type - Multiple numerical input
Question type - Multiple short text
Question type - Numerical input
Question type - Ranking
Question type - Short free text
Question type - Text display
Question type - Yes-No
Question types
Questions - introduction
QueXML PDF Export
Quick start guide - LimeSurvey 2.50+
Quick start guide - LimeSurvey 3.0+
Quick-translation
Regenerate question codes
Reorder questions and question groups
Reset conditions
Resources
Responses & statistics
Responses (survey results)
Running a survey safely
Setting conditions
SGQA identifier
Statistics
Survey group permissions
Survey menu
Survey participants
Survey permissions
Survey quotas
Survey settings
Survey settings version 2
Survey structure
Survey toolbar options
Surveys - introduction
Surveys - management
Tab Separated Value survey structure
Template:Deprecated
Template:DeprecatedIn
Template:Example
Template:FeatureChange
Template:FeatureStarting
Template:Hint
Template:NewIn
Template:UpdatedIn
Testing a survey
Text elements
Theme editor
Theme options
Themes
Timing statistics
Tools
Transferring an installation
Translating LimeSurvey
Troubleshooting
TwoFactorAdminLogin
Upgrading from a previous version
URL fields
Using regular expressions
Version change log
Version guide
View saved but not submitted responses
Workarounds
Language
aa - Afar
aae - Arbëresh
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
acm - Iraqi Arabic
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
aln - Gheg Albanian
alt - Southern Altai
am - Amharic
ami - Amis
an - Aragonese
ang - Old English
ann - Obolo
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
ban-bali - Balinese (Balinese script)
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bci - Baoulé
bcl - Central Bikol
bdr - West Coast Bajau
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bew - Betawi
bg - Bulgarian
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
blk - Pa'O
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Mindong
ce - Chechen
ceb - Cebuano
ch - Chamorro
chn - Chinook Jargon
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cpx - Pu–Xian Min
cpx-hans - Pu–Xian Min (Simplified Han script)
cpx-hant - Pu–Xian Min (Traditional Han script)
cpx-latn - Pu–Xian Min (Latin script)
cr - Cree
crh - Crimean Tatar
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
crh-ro - Dobrujan Tatar
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
dag - Dagbani
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
dga - Dagaare
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
efi - Efik
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - Spanish (formal address)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
fat - Fanti
ff - Fula
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fon - Fon
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gaa - Ga
gag - Gagauz
gan - Gan
gan-hans - Gan (Simplified Han script)
gan-hant - Gan (Traditional Han script)
gcf - Guadeloupean Creole
gcr - Guianan Creole
gd - Scottish Gaelic
gl - Galician
gld - Nanai
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
gpe - Ghanaian Pidgin
grc - Ancient Greek
gsw - Alemannic
gu - Gujarati
guc - Wayuu
gur - Frafra
guw - Gun
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
hno - Northern Hindko
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
hsn - Xiang
ht - Haitian Creole
hu - Hungarian
hu-formal - Hungarian (formal address)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
ibb - Ibibio
id - Indonesian
ie - Interlingue
ig - Igbo
igl - Igala
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kai - Karekare
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kcg - Tyap
kea - Kabuverdianu
kg - Kongo
kge - Komering
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjh - Khakas
kjp - Eastern Pwo
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ksw - S'gaw Karen
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kus - Kʋsaal
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lld - Ladin
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mad - Madurese
mag - Magahi
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Māori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mnc - Manchu
mnc-latn - Manchu (Latin script)
mnc-mong - Manchu (Mongolian script)
mni - Manipuri
mnw - Mon
mo - Moldovan
mos - Mossi
mr - Marathi
mrh - Mara
mrj - Western Mari
ms - Malay
ms-arab - Malay (Jawi script)
mt - Maltese
mus - Muscogee
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Minnan
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
nia - Nias
nit - కొలామి
niu - Niuean
nl - Dutch
nl-informal - Dutch (informal address)
nmz - Nawdm
nn - Norwegian Nynorsk
no - Norwegian
nod - Northern Thai
nog - Nogai
nov - Novial
nqo - N’Ko
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nyn - Nyankole
nyo - Nyoro
nys - Nyungar
oc - Occitan
ojb - Northwestern Ojibwa
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pcm - Nigerian Pidgin
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
pwn - Paiwan
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rki - Arakanese
rm - Romansh
rmc - Carpathian Romani
rmy - Vlax Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
rsk - Pannonian Rusyn
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rut - Rutul
rw - Kinyarwanda
ryu - Okinawan
sa - Sanskrit
sah - Yakut
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
se-fi - Northern Sami (Finland)
se-no - Northern Sami (Norway)
se-se - Northern Sami (Sweden)
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
sh-cyrl - Serbo-Croatian (Cyrillic script)
sh-latn - Serbo-Croatian (Latin script)
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy - Shawiya
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sjd - Kildin Sami
sje - Pite Sami
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
smn - Inari Sami
sms - Skolt Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
sro - Campidanese Sardinian
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - Siberian Tatar
su - Sundanese
sv - Swedish
sw - Swahili
syl - Sylheti
szl - Silesian
szy - Sakizaya
ta - Tamil
tay - Tayal
tcy - Tulu
tdd - Tai Nuea
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tly-cyrl - Talysh (Cyrillic script)
tn - Tswana
to - Tongan
tok - Toki Pona
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
trv - Taroko
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
ttj - Tooro
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vmw - Makhuwa
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
wal - Wolaytta
war - Waray
wls - Wallisian
wo - Wolof
wuu - Wu
wuu-hans - Wu (Simplified Han script)
wuu-hant - Wu (Traditional Han script)
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - Saisiyat
yi - Yiddish
yo - Yoruba
yrl - Nheengatu
yue - Cantonese
yue-hans - Cantonese (Simplified Han script)
yue-hant - Cantonese (Traditional Han script)
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
Format
Export for off-line translation
Export in native format
Export in CSV format
Fetch
{{DISPLAYTITLE:Usando expresiones regulares}}<languages /> __TOC__ Las expresiones regulares deben comenzar y terminar con una barra diagonal ("/"). Puede encontrar una buena biblioteca de expresiones regulares en http://www.regexlib.net/. Estos patrones casi siempre funcionarán si están rodeados de barras diagonales. Para probar su expresión regular, puede [https://regex101.com/ usar este probador de expresiones regulares]. {{Nota|Para mejorar esta sección wiki, le solicitamos que agregue sus expresiones regulares probadas con éxito para proporcionar una mejor comprensión de esta función a los nuevos usuarios (potenciales) de LimeSurvey.}} {{Alert|title=Atención|text= ¡Tenga en cuenta que todos los ejemplos siguientes están escritos en una línea!}} <span id="Important:_Regular_Expressions_in_conditions"></span> =Importante: Expresiones regulares en condiciones= Tenga en cuenta que cuando utilice expresiones regulares en el editor de condiciones, NO incluya la barra diagonal inicial y final. <span id="Email_validation"></span> =Validación de correo electrónico= Actualización (12/2018): Dado que hoy en día los nombres de dominio no solo contienen caracteres especiales como "ü", sino que también usan más de 3 caracteres como nombre de dominio como .''tech'' o .''company'', la siguiente expresión regular de correo electrónico sólo comprueba si "@" y "." existe dentro de la dirección de correo electrónico ingresada. <source lang="html"> /^.+?@.+?\..+$/ </source> Si desea validar una dirección por línea, en un campo de texto largo de varias líneas: <source lang="html"> /^(((\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*(\r\ n)?\n?)+)*)$/ </source> En esta expresión regular obsoleta, el nombre de dominio está limitado a 3 caracteres, lo que no cubre todos los dominios disponibles: <source lang="html"> /^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})$/ </source> <span id="Postcodes"></span> =Códigos postales= <span id="Australian_postcodes:"></span> ==Códigos postales de Australia:== <source lang="html">/^[0-9]{4}/</source> <span id="Brazilian_postcodes"></span> ==Códigos postales brasileños== <source lang="html">/^[0-9]{2}\.[0-9]{3}-[0-9]{3}$/</source> <span id="Canadian_postcodes"></span> ==Códigos postales canadienses== <source lang="html">/^[a-zA-Z]\d{1}[a-zA-Z](\-| |)\d{1}[a-zA-Z]\d{1}$/</source> <span id="US_postal_codes"></span> ==códigos postales de EE.UU.== <source lang="html">/^[0-9]{5}([- /]?[0-9]{4})?$/</source> Para que el código postal comience con cero, use: <source lang="html">/^[0-9]{5}(?:-[0-9]{4})?$/</source> <span id="UK_postcodes"></span> == Códigos postales del Reino Unido == <source lang="html">/^[AZ][AZ]?[0-9][A-Z0-9]? ?[0-9][ABDEFGHJLNPQRSTUWXYZ]{2}$/yo</source> Tenga en cuenta que esto no es muy exacto y una validación más exacta es mucho más compleja. Por ejemplo, consulte [https://stackoverflow.com/questions/164979/uk-postcode-regex-comprehensive StackOverflow respuesta] y [https://en.wikipedia.org/wiki/Talk:Postcodes_in_the_United_Kingdom#Regular_Expressions Wikipedia] para obtener más información. información. <span id="French_postcodes"></span> ==Códigos postales franceses== <source lang="html">/(^[0-8]\d\d{3}$)|(^9[0-5]\d{3}$)|(^97[1-6]\d{2}$)| (^98[46-8]\d{2}$)/</source> La expresión anterior es muy precisa y permitirá comprobar si existe o no el Departamento francés (dos primeros dígitos), incluidos los Departamentos y Territorios de Ultramar (DOM-TOM). <span id="Phone_numbers"></span> =Números de teléfono= <span id="US_phone_numbers"></span> ==Números de teléfono de EE.UU.== <source lang="html">/^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d {2}[- ]?\d{4}$/</source> o <source lang="html">/^[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{3}[\(\ )\.\- ]{0,}[0-9]{4}[\(\)\.\- ]{0,}$/</source> Esta segunda opción coincidirá con todos los números de teléfono canadienses y estadounidenses que incluyan símbolos que no sean dígitos, incluidos: <source lang="html">. ( ) - (espacio)</source> Esto le permitirá hacer coincidir números de teléfono que se parecen a continuación: *(555)555 5555 *555.555.5555 *555 555 5555 *(555)-555-5555 * 555-555-5555 *555555555 <span id="Australian_phone_numbers"></span> ==Números de teléfono australianos== Los siguientes patrones coinciden con todos los números de teléfono fijos y móviles de Australia, incluidos los que tienen el prefijo de país "+61": *(02) 9123 6535 *03 1234-5345 *0412 345 678 *+ 61 2 3456 789 Pero no: * 234 3450 234 *a234 534 3432 *134567 *123456789013 Se ignoran los corchetes, los espacios en blanco y los guiones. Las versiones 'Muy precisas:' que se enumeran aquí coinciden con los primeros cuatro o cinco dígitos de un número para garantizar que sean números australianos válidos. El parámetro 'No muy preciso:' solo coincide con el primer y segundo dígito, por lo que puede permitir números no válidos. <span id="All_Australian_phone_numbers_(mobile_and_landline_-_area_code_required)"></span> ===Todos los números de teléfono australianos (móviles y fijos; se requiere código de área)=== Muy preciso: <source lang="html">/^\(?(?:\+?61|0)(?:(?:2\)?[ -]?(?:3[ -]?[38]|[46-9][ -]? [0-9]|5[ -]?[0-35-9])|3\)?(?:4[ -]?[0-57-9]|[57-9][ -]?[ 0-9]|6[ -]?[1-67])|7\)?[ -]?(?:[2-4][ -]?[0-9]|5[ -]?[2 -7]|7[ -]?6)|8\)?[ -]?(?:5[ -]?[1-4]|6[ -]?[0-8]|[7-9] [ -]?[0-9]))(?:[ -]?[0-9]){6}|4\)?[ -]?(?:(?:[01][ -]?[ 0-9]|2[ -]?[0-57-9]|3[ -]?[1-9]|4[ -]?[7-9]|5[ -]?[018])[ -]?[0-9]|3[ -]?0[ -]?[0-5])(?:[ -]?[0-9]){5})$/ </source> No muy preciso: <source lang="html">/^(?:\+?61|0)[2-478](?:[ -]?[0-9]){8}$/</source> <span id="All_Australian_phone_numbers_(landlines_only_-_area_code_required)"></span> ===Todos los números de teléfono australianos (solo teléfonos fijos; se requiere código de área)=== Muy preciso: <source lang="html">/^\(?(?:\+?61|0)(?:2\)?[ -]?(?:3[ -]?[38]|[46-9][ -]?[0- 9]|5[ -]?[0-35-9])|3\)?(?:4[ -]?[0-57-9]|[57-9][ -]?[0-9 ]|6[ -]?[1-67])|7\)?[ -]?(?:[2-4][ -]?[0-9]|5[ -]?[2-7] |7[ -]?6)|8\)?[ -]?(?:5[ -]?[1-4]|6[ -]?[0-8]|[7-9][ -] ?[0-9]))(?:[ -]?[0-9]){6}$/</source> No muy preciso: <source lang="html">/^(?:\+?61|\(?0)[2378]\)?(?:[ -]?[0-9]){8}$/</source> <span id="New_South_Wales_landline_phone_numbers_(area_code_optional)"></span> ===Números de teléfonos fijos de Nueva Gales del Sur (código de área opcional)=== Muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)2\)?[ -]?)?(?:3[ -]?[38]|[46-9][ -]?[ 0-9]|5[ -]?[0-35-9])(?:[ -]?[0-9]){6}$/</source> No muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)2\)?(?:[ -]?[0-9]){7}[0-9]$/</source> <span id="Victorian_and_Tasmanian_landline_phone_numbers_(area_code_optional)"></span> ===Números de teléfonos fijos de Victoria y Tasmania (código de área opcional)=== Muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)3\)?[ -]?)?(?:4[ -]?[0-57-9]|[57-9][ -]?[0-9]|6[ -]?[1-67])(?:[ -]?[0-9]){6}$/</source> No muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)3\)?(?:[ -]?[0-9]){7}[0-9]$/</source> <span id="Queensland_landline_phone_numbers_(area_code_optional)"></span> ===Números de teléfonos fijos de Queensland (código de área opcional)=== Muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)7\)?[ -]?)?(?:[2-4][ -]?[0-9]|5[ -] ?[2-7]|7[ -]?6)(?:[ -]?[0-9]){6}$/</source> No muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)7\)?(?:[ -]?[0-9]){7}[0-9]$/</source> <span id="South_Australia,_Northern_Territory,_Western_Australia_landline_phone_numbers_(area_code_optional)"></span> ===Números de teléfonos fijos de Australia del Sur, Territorio del Norte y Australia Occidental (código de área opcional)=== Muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)8\)?[ -]?)?(?:5[1-4]|6[0-8]|[7-9] [0-9])$/</source> No muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)8\)?(?:[ -]?[0-9]){7}[0-9]$/</source> <span id="Australian_mobile_phone_numbers_only"></span> ===Solo números de teléfonos móviles australianos=== Muy preciso: <source lang="html">/^(?:\+?61|0)4 ?(?:(?:[01] ?[0-9]|2 ?[0-57-9]|3 ?[1-9]|4 ? [7-9]|5 ?[018]) ?[0-9]|3 ?0 ?[0-5])(?: ?[0-9]){5}$/</source> No muy preciso: <source lang="html">/^(?:\(?(?:\+?61|0)4\)?(?:[ -]?[0-9]){7}[0-9]$/</source> ==Número de teléfono belga== <source lang="html"> /^((\+|00)32\s?|0)(\d\s?\d{3}|\d{2}\s?\d{2})(\s?\d{2 }){2}$/</source> ==Número de teléfono móvil belga== <source lang="html"> /^((\+|00)32\s?|0)4(60|[789]\d)(\s?\d{2}){3}$/</source> ==Número de teléfono francés== <source lang="html"> /^((\+|00)33\s?|0)[1-59](\s?\d{2}){4}$/</source> ==Número de teléfono móvil francés== <source lang="html"> /^((\+|00)33\s?|0)[67](\s?\d{2}){4}$/</source> ==Número de teléfono de Luxemburgo== <source lang="html"> /^((\+|00\s?)352)?(\s?\d{2}){3,4}$/</source> ==Número de teléfono móvil de Luxemburgo== <source lang="html"> /^((\+|00\s?)352)?\s?6[269]1(\s?\d{3}){2}$/</source> =Marcos alemanes (con más o menos opcional)= <source lang="html"> /^[1-6]{1}[\+|\-]?$/</source> <span id="Age_validation"></span> =Validación de edad= Ejemplo: ¡Edad 20-99 <source lang="html"> /([2-9][0-9])/</source> Ejemplo: ¡Edad 18-35 <source lang="html"> /(1[8-9]|2[0-9]|3[0-5])/</source> Ejemplo: ¡Edad 19-65 <source lang="html"> /^(1[8-9]|[2-5][0-9]|6[0-5])$/</source> <span id="Number_validation"></span> =Validación de números= ==Números del 1 al 99999== <source lang="html"> /^([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9 ][0-9]|[1-9][0-9][0-9][0-9][0-9])$/</source><source lang="html"> /^[1-9][0-9]{0,4}$/ hace lo mismo que arriba pero debería ejecutarse un poco más rápido</source> ==Números del 1 al 999, del 1.000 al 999.999 al 999.999.999== <source lang="html"> /^[1-9][0-9]{0,2}(?:\.[0-9]{3}){0,2}$/</source> Acepta números del 1 al 999, del 1.000 al 999.999 y al 999.999.999 pero rechaza números como 999.1.1, 94.22.22, 999.1.22, 999.11.1, 999.1.333 ==Validación de números con decimal opcional (para precio)== Acepta números del 0 al 199, con 2 decimales opcionales: <source lang="html"> /^([1][0-9][0-9]|[1-9][0-9]|[0-9])((\.)[0-9][0-9]) ps</source> ==Validación de números con separador de miles== Espacio como separador, sin menos <source lang="html"> /^(?!0)\d{1,3}(\ \d{3})*$/</source> Punto como separador, se permite menos <source lang="html"> /^-?(?!0)\d{1,3}(\.\d{3})*$/</source> Fuerza dos puntos decimales y acepta números del 1,00 al 999.999.999,00 con una coma opcional que delimita miles/millones incluido todo lo siguiente: 1,00, 1.000,00, 12.345,67, 12345,02, 123.456.468,00, 1234566,00, 123 456789.00 pero no 1 ,23,00, 12,3,4 o 1234,43,04 <source lang="html"> /^[1-9][0-9]{0,2}(?:,?[0-9]{3}){0,3}\.[0-9]{2}$/</source> Similar a lo anterior: fuerza dos puntos decimales pero acepta un "0" antes del separador decimal ",". <source lang="html"> /[0-9]{0,2}(?:,?[0-9]{3}){0,3}\.[0-9]{2}$/</source> Igual que arriba, pero los dos puntos decimales son opcionales: <source lang="html"> /^[1-9][0-9]{0,2}(?:,?[0-9]{3}){0,3}(?:\.[0-9]{2}) ps</source> <span id="Month_(1-12)"></span> ==Mes (1-12)== Si deseas preguntar por el mes de nacimiento de una persona puedes validar el ingreso de la siguiente manera: <source lang="html">/^[0]*[1-9]$|^[0]*1[0-2]$/</source> <span id="Minimum_width_(set_to_3_in_this_example)"></span> =Ancho mínimo (establecido en 3 en este ejemplo)= <source lang="html">/^.{3,}$/</source> <span id="Currency"></span> =Moneda= <span id="US_currency_(dollar_sign_and_cents_optional)"></span> ==Moneda estadounidense (signo de dólar y centavos opcionales)== <source lang="html">/^\$?\d+(\.(\d{2}))?$/</source> Compruebe el uso de comas: <source lang="html"> /^\$?\d{1,3}(\d+(?!,))?(,\d{3})*(\.\d{2})?$/</source> <span id="Swiss_price"></span> ==Precio suizo== Un número con dos números decimales después del punto decimal de los cuales el último es un 5 o un 0: <source lang="html">/^(\d+)(\.\d(05)?)?$/</source> <span id="Validate_score"></span> =Validar puntuación= ==1-10== <source lang="html">/^[1-9]{1}$|^10$/</source> ==1-100== <source lang="html">/^[1-9]?[0-9]{1}$|^100$/</source> <span id="Text_validation"></span> =Validación de texto= El [[Tipo de pregunta - Texto breve múltiple|tipo de pregunta de texto breve múltiple]] no admite respuestas mínimas ni máximas en este momento. Una forma de evitar esto es utilizar un [[Tipo de pregunta - Texto libre largo|tipo de pregunta de texto libre largo]] con una expresión regular. La siguiente expresión prueba al menos una palabra por línea durante al menos 3 líneas y no más de 10 líneas: <source lang="html">/(?:[^,.;:?!& \n\r]+(?: [^,.;:?!& \n\r]+)*)(?:[,.;:?! & \n\r]?(?:\n|\r|\n\r|\r\n)(?:[^,.;:?!& \n\r]+(?: [^, .;:?!& \n\r]+)*)){2,10}/es</source> Si desea decir cinco palabras por línea, puede cambiar la primera y la última estrella/asterisco a {4,}: <source lang="html">/(?:[^,.;:?!& \n\r]+(?: [^,.;:?!& \n\r]+){4,})(?:[,.; :?!& \n\r]?(?:\n|\r|\n\r|\r\n)(?:[^,.;:?!& \n\r]+(?: [^,.;:?!& \n\r]+){4,})){2,10}/es</source> Si desea una o más palabras por línea (entre la línea 1 y la línea 5), puede cambiar el contenido ubicado dentro de las últimas llaves a '''0,4''' (tenga en cuenta que usa 0 porque ya está haciendo coincidir la primera línea). <source lang="html">/(?:[^,.;:?!& \n\r]+(?: [^,.;:?!& \n\r]+)*)(?:[,.;:?! & \n\r]?(?:\n|\r|\n\r|\r\n)(?:[^,.;:?!& \n\r]+(?: [^, .;:?!& \n\r]+)*)){0,4}/es</source> <span id="Word_count"></span> ==Recuento de palabras== Lo siguiente restringe el número de palabras permitidas a un mínimo de 1 y un máximo de 200: <source lang="html">/^[-\w]+(?:\W+[-\w]+){0,199}\W*$/</source> Para aumentar el mínimo cambie la parte cero de {0,199}. Para aumentar o disminuir el máximo, cambie la parte "199" de {0,199}. <span id="Time_validation"></span> =Validación de tiempo= Hay varias formas de escribir formatos de hora. Algunas de las opciones posibles son 12 horas o 24 horas, con segundos o sin ellos. Aunque es una opción usar el [[Tipo de pregunta - Fecha|tipo de pregunta de fecha]] (también puede capturar el tiempo), puedes usar el [[Tipo de pregunta - Texto libre corto|tipo de pregunta de texto libre corto]] con uno de las siguientes expresiones regulares de validación. Las siguientes tres cadenas de validación prueban el tiempo de 24 horas (en orden de aparición) sin segundos, con segundos opcionales y por último con segundos requeridos: <source lang="html">/^(?:[01][0-9]|2[0-3]):[0-5][0-9]$/</source> <source lang="html">/^(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?$/</source> <source lang="html">/^(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/</source> Los tres siguientes coinciden con el tiempo de 12 horas, como se indicó anteriormente con segundos, segundos opcionales y segundos requeridos: <source lang="html">/^(?">00:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0- 9] (?:[ap]m|[AP]M)|12:[0-5][0-9] (?:pm|PM))$/</source> <source lang="html">/^(?:00:[0-5][0-9](?::[0-5][0-9])? (?:soy|AM)|(?:0[1-9] |1[01]):[0-5][0-9](?::[0-5][0-9])? (?:[ap]m|[AP]M)|12:[ 0-5][0-9](?::[0-5][0-9])? (?:pm|PM))$/</source> <source lang="html">/^(?:00:[0-5][0-9]:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1[01] ):[0-5][0-9]:[0-5][0-9] (?:[ap]m|[AP]M)|12:[0-5][0-9]: [0-5][0-9] (?:pm|PM))$/</source> Los tres siguientes coinciden con el tiempo de 12 o 24 horas como se indicó anteriormente con segundos, segundos opcionales y segundos requeridos: <source lang="html">/^(?:(?:00:[0-5][0-9] (?:soy|AM)|(?:0[1-9]|1[01]):[0-5][ 0-9] (?:[ap]m|[AP]M)|12:[0-5][0-9] (?:pm|PM))|(?:[01][0-9] |2[0-3]):[0-5][0-9])$/</source> <source lang="html">/^(?:(?:00:[0-5][0-9](?[0-5][0-9])? (?:soy|AM)|(?:0[1-9]|1[01]):[0-5][0-9](?[0-5][0-9])? (?:[ap]m|[AP]M)|12:[0 -5][0-9](?[0-5][0-9])? (?:pm|PM))|(?:[01][0-9]|2[0-3]) :[0-5][0-9](?[0-5][0-9])?)$/</source> <source lang="html">/^(?:(?:00:[0-5][0-9]:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1 [01]):[0-5][0-9]:[0-5][0-9] (?:[ap]m|[AP]M)|12:[0-5][0- 9]:[0-5][0-9] (?:pm|PM))|(?:[01][0-9]|2[0-3]):[0-5][0- 9]:[0-5][0-9])$/</source> <span id="US_states"></span> =Estados de EE.UU.= Para validar para un estado, utilice lo siguiente (por ejemplo, Texas): *TX solo mayúsculas:<source lang="html"> /^(TX)$/</source> *tx solo minúsculas:<source lang="html"> /^(tx)$/</source> *TX mayúsculas o minúsculas:<source lang="html"> /^([T|t][X|x])$/</source> <span id="Profanity_Filter"></span> =Filtro de malas palabras= Para filtrar palabras blasfemas de una respuesta: <source lang="html">/^(?i)((?!\bENTERPROFANITYHERE\b).)*$(?-i)/</source> Reemplace "ENTERPROFANITYHERE" con su mala palabra. \b permitirá pasar palabras como "asesinato" y "hola" si ingresas "culo" o "infierno" como palabra blasfema. Esto también funciona si intentas omitir otras palabras, nombres, etc. de las respuestas. <span id="Helpful_links"></span> =Enlaces útiles= Al comienzo de esta sección wiki, le recomendamos que utilice https://regex101.com/ para probar/crear expresiones regulares. También puede utilizar https://www.regextester.com/ para crear expresiones en caso de que no esté satisfecho con la primera opción. Puede utilizar https://extendsclass.com/regex-tester.html para visualizar expresiones regulares.