Community Patterns

1

Chinese Digits

Created·2024-01-05 07:56
Updated·2024-02-06 07:02
Flavor·PCRE (Legacy)
Match Chinese Digits less than 1×10^16, such as “一千两百三十四万”、“八萬点七六五”、“玖仟玖佰玖拾玖万玖仟玖佰玖拾玖亿玖仟玖佰玖拾玖万玖仟玖佰玖拾玖点玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖”,Upper and lower case Chinese can be mixed, but Chinese numbers and English numbers cannot be mixed. Illegal numbers will not be matched. For example: “两十六” will not be matched, as the correct one should be “二十六”,In general Chinese, “两” and “十” are not used together; “两千零零六” will not be matched, as the correct one should be “两千零六”,as consecutive "零" in the integer part of Chinese numbers are illegal. It need a regex engine that supports the functionality of matching an expression defined in a named capture group, such as "(?[a-z]+)\d+(&letter)". 用于匹配小于1×10^16的中文数字,例如:“一千两百三十四万”、“八萬点七六五”、“玖仟玖佰玖拾玖万玖仟玖佰玖拾玖亿玖仟玖佰玖拾玖万玖仟玖佰玖拾玖点玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖”,大小写中文数字可以混用,中文数字与英文数字不可以混用。 不合法的中文数字不会被匹配,例如:“两十六”、“两十六万”不会被匹配,因为中文习惯中不将“两”与“十”连用;“两千零零六”不会被匹配,因为其中有连续的零。 需要引擎支持引用已定义组的表达式,例如:"(?[a-z]+)\d+(&letter)"。
Submitted by anonymous
-1

pesquisa_cautelar

Created·2023-07-14 19:37
Flavor·PCRE (Legacy)
Array ( [0] => Página 1 de 5 MEGA [1] => Código da Consulta: 15240795 [2] => MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA1 [3] => Data da Pesquisa: quinta-feira, 7 de julho de 2022 - 16:31:59 Data da Impressão: quarta-feira, 12 de julho de 2023 - 11:31:35 [4] => VW VW FUSCA 1600 [5] => MARCA/MODELO: VW VW FUSCA 1600 [6] => ANO FAB/MODELO: 1996 / 1996 [7] => RENAVAM: 00658362895 COMBUSTIVEL: GASOLINA [8] => CHASSI: 9BWZZZ113TP004878 [9] => PLACA: AGJ3548 [10] => COR: AMARELA [11] => CILINDRADAS: 0 [12] => MEGA BASE ESPECIAL [13] => [14] => RESUMO DAS PRINCIPAIS BASES ABAIXO [15] => RESTRIÇÕES ESTADUAL [16] => MULTAS E DÉBITOS [17] => SINISTRO [18] => HISTÓRICO DE LAUDO DE MOTOR LEIL\bO [19] => HISTÓRICO DE ROUBO E FURTO [20] => HISTÓRICO DE CONSULTAS [21] => HISTÓRICO DE LAUDO CAUTELAR [22] => ANO FABRICAÇ\bKP 1996 [23] => MARCA MODELO: VW VW FUSCA 1600 [24] => COMBUSTIVEL: GASOLINA [25] => TIPO VEICULO: AUTOMOVEL ANO MODELO: 1996 [26] => COR: AMARELA [27] => ESPÉCIE VEICULO: PASSAGEIRO [28] => CATEGORIA VEICULO: PARTICULAR [29] => PASSAGEIROS: 5 [30] => CILINDRADAS: 0 [31] => CAPACIDADE DE CARGA 0,00 [32] => QUANTIDADE DE EIXOS: 0 PROCEDÊNCIA VEICULO: NACIONAL [33] => POTÊNCIA: 53 [34] => CMT/PBT VEÍCULO: 0 / / 0 [35] => FICHA CADASTRAL [36] => DATA EMISS\bKZsP 31/05/2007 DATA LICENCIAMENTO: 04/01/2022SINISTRO [37] => ESPECIAL ROUBO E FURTO SINISTRO / [38] => ACIDENTE REMARKETING SEGURADORA / [39] => FINANCEIRA [40] => [41] => Página 2 de 5 EXER. LICENCIAMENTO: 2022 [42] => PLACA ATUAL: AGJ3548 [43] => UF PLACA: SP [44] => CHASSI 9BWZZZ113TP004878 RENAVAM: 00658362895
Submitted by emerson

Community Library Entry

83

Regular Expression
Created·2014-06-26 09:59
Updated·2023-07-20 15:08
Flavor·Python

r"
^ # get the title of this movie or series (?P<title> [-\w'\"]+ # match separator to later replace into correct title (?P<separator> [ .] ) # note this *must* be lazy for the engine to work ltr not rtl (?: [-\w'\"]+\2 )*? ) # start of movie vs serie check (?: # if this is an episode, lets match the season # number one way or another. if not, the year # of the movie (?: # series. can be a lot prettier if we used perl regex... # make sure this is not just a number in the title followed by our separator. # like, iron man 3 2013 or my.fictional.24.series (?! \d+ \2 ) # now try to match the season number (?: s (?: eason \2? )? )? (?P<season> \d\d? ) # needed to validate the last token is a dot, or whatever. (?: e\d\d? (?:-e?\d\d?)? | x\d\d? )? | # this is likely a movie, match the year (?P<year> [(\]]?\d{4}[)\]]? ) ) # make sure this ends with the separator, otherwise we # might be in the middle of something like "1080p" (?=\2) | # if we get here, this is likely still a movie. # match until one of the keywords (?= BOXSET | XVID | DIVX | LIMITED | UNRATED | PROPER | DTS | AC3 | AAC | BLU[ -]?RAY | HD(?:TV|DVD) | (?:DVD|B[DR]|WEB)RIP | \d+p | [hx]\.?264 ) )
"
gimx
Open regex in editor

Description

A neat regex for finding out whether a given torrent name is a series or a movie.

Returns the full name of the series with the separator needed to make it pretty (ie, replace it with space or what you want). Also returns the season number or the year for the movie/series, depending on what was previously matched.

Submitted by Firas Dib