Questions tagged as 'regex'

1
answer

Why does not Lookbehind exist in JavaScript?

I found out that there is no group construct lookbehind in Regex's made in JavaScript so I had some questions like: Why does not it exist? Home Is there any reason that makes it incompatible with language or unnecessary? If it is unneces...
asked by 25.05.2017 / 19:19
1
answer

Scraping with python

How to capture one or more sentences from a website with Python and / or regular expressions? I want everything that starts with <p>&#8220; e acabe com &#8221;</p> Example: <p>&#8220;frasefrasefrasefrasefr...
asked by 26.01.2015 / 23:47
3
answers

Regex for this format xxxxxxxxxxxx_v2

How can I make a regex that accepts in this format: 1q2e5g6s4t5s2u1i5dy1s9u14i2s5u9o_v2 1q2e5g6s4t5s2u1i5dy1s9u14i2s5u9o has 32 characters and then has _v2 - the last 3 are always _v2 . Examples: xxxxxxxxx_v2...
asked by 27.10.2018 / 22:38
2
answers

Error replacing occurrence in string using replaceAll

I extract the text of several lines of a PDF, at the beginning of each line I have a configuration of the font size and family used in that line, but then I need to remove this information. First I made using replace , as follows: Str...
asked by 11.10.2015 / 03:53
2
answers

How to delete a certain group from the regular expression

I have a tax file that comes with the following information in the line: Ex:. OCF|DINHEIRO|160.12|12 To fix it I have to delete a part, and the right one would be: OCF|DINHEIRO|160.12 So I started doing a regular expression in notepad...
asked by 13.06.2018 / 12:53
4
answers

REGEX JAVA Recognize different character group

I'm breaking my head at link I'm trying to make a REGEX code that validates some .txt where it does not contain the JJ or M3 characters at the end of the line. For example: I have the 3 .txt with the lines below: .txt 1 4481; 7783...
asked by 25.10.2017 / 21:22
2
answers

Why sets with intervals of A-z returns symbols in REGEX?

Scenario: const texto = 'ABC [abc] a-c 1234'; console.log(texto.match(/[A-z]/g)) Because the set of A(maiúsculo) to z(minusculo) , that is, /[A-z]/g returned me [ and ] ? The result should no...
asked by 10.03.2018 / 21:58
3
answers

How to remove specific words with javascript

How can I remove specific values from the page title? Title : STACKOVERFLOW REMOVE : STACK RESULT : OVERFLOW     
asked by 04.02.2015 / 00:10
5
answers

Get first name with Regular Expression

I need to get the first name with regular expression, but I'm not getting it right. Today I use the code like this: <?php preg_match('/[[:alnum:]]+/i', 'Alisson Acioli', $matches); return $matches[0]; ?>    Output: Alisson When t...
asked by 29.12.2015 / 18:36
6
answers

Regular expression to accept numbers and letters, regardless of sequence

I have the following problem, I need to validate a password field with at least 8 characters, being at least 2 numbers and the rest letters, they can be in any position. 12abcdef abcdef12 The expression I made works in the cases above: f...
asked by 14.07.2017 / 19:54