Programación Web y Scripting > Python
Duda con Regexp
(1/1)
Malik:
Tengo esto:
--- Código: Python --- return re.sub(r"(d{3}B)", r"1,", str(number)[::-1])[::-1]
De ahí no entiendo esto:
B
y el 1 de r"1,"
¿Alguien puede explicarme que representa eso? He buscando infor por google pero no logro aclarar la duda.
thanks!!!
su -:
--- Cita de: "docs.python.org" ---B
Matches the empty string, but only when it is not at the beginning or end of a word. This is just the opposite of b, so is also subject to the settings of LOCALE and UNICODE.
--- Fin de la cita ---
http://docs.python.org/library/re.html
Malik:
Gracias por el enlace, su.
Lo dejé un poco abandonado esto de python por falta de tiempo, pero en breve vuelvo a darle caña :)
Un saludo
Navegación
Ir a la versión completa