diff --git a/translations/README-pt_BR.md b/translations/README-pt_BR.md index 68db0e1..58dfe3b 100644 --- a/translations/README-pt_BR.md +++ b/translations/README-pt_BR.md @@ -78,6 +78,7 @@ A expressão regular acima aceita as strings `john_doe`, `jo-hn_doe` e `john12_a - [Indiferente à Maiúsculas](#51-indiferente-à-maiúsculas) - [Busca Global](#52-busca-global) - [Multilinhas](#53-multilinhas) +- [Guloso vs Não-Guloso](#6-guloso-vs-não-guloso) ## 1. Combinações Básicas @@ -420,6 +421,23 @@ O modificador `m` é usado para realizar uma busca em várias linhas. Como falam [Teste a RegExp](https://regex101.com/r/E88WE2/1) +### 6. Guloso vs Não-Guloso + +Por padrão, uma regex irá realizar uma consulta gulosa, isto significa que a busca irá capturar ao padrão mais longo possível. Nós podemos usar `?` para buscar de uma forma não-gulosa, isto significa que a busca irá capturar ao padrão mais curto possível. + +
+"/(.*at)/" => The fat cat sat on the mat.+ + +[Teste a RegExp](https://regex101.com/r/AyAdgJ/1) + +
+"/(.*?at)/" => The fat cat sat on the mat.+ + +[Teste a RegExp](https://regex101.com/r/AyAdgJ/2) + + ## Contribution * Reporte bugs