Questions tagged as 'regex'

1
answer

Regex to capture text block

I need to extract blocks of text that are inside #regions: #region VARIAVEIS GLOBAIS string aux1 = "teste"; string aux2 = "teste2"; ... #endregion The return would be: string aux1 = "teste"; string aux2 = "teste2"; ... How do I do this...
asked by 02.08.2015 / 19:28
1
answer

Capturing content from double quotation marks with recursion with RegEx

I need to capture the quotes in double quotation marks with RegEx in PHP. I tried to use recursion with line break in several ways, but to no avail. I browsed several topics and I researched how to do this, but so far I have not been able to....
asked by 06.08.2015 / 14:29
1
answer

Extract HTML value

I get the html and a part of it from where I need to extract the data and this one <td class="address-list-item"> NOme silva <div class="modal-content" style="display:none;"> <div class="address-list-moda...
asked by 03.06.2015 / 08:09
1
answer

Select all elements of an array in a variable with Regex in PHP

I would like to make a regex to apply a class to each line with roman number, would the regex be? /(<li>\s*<p>$romanos\)_\-_/ ? The documents look like this: <li> <p>I - blablabla</p> </li> <l...
asked by 05.05.2015 / 06:32
1
answer

Validate categories with regular expression

I'd like to know how to validate categories with regular expressions. So I have a list of categories separated by commas. Each word must have a maximum of 20 characters, I need to validate each comma if the word has alphanumeric characters. I...
asked by 08.08.2015 / 23:17
1
answer

Regular expression for href and www / https / http links

Good morning, I have 2 regular expressions, where one serves to get the URL of any href , and another that I need to sort out that would only be to get the URL's that are not within href , that is, only the URL's entered with www...
asked by 06.02.2015 / 11:13
1
answer

Regular expression to get input and HTTP header

How to construct a regular expression that selects this here? Set-Cookie: csrftoken=bf8748c0b1e113430d9757cf0ed06f4a; expires=Mon, 04-May-2015 20:54:08 GMT; Max-Age=31449600; Path=/ <input type="hidden" name="csrfmiddlewaretoken" value=...
asked by 05.05.2014 / 23:01
1
answer

Backslash in Regular Expression

I was studying java and the course instructor left me a challenge to validate an email using regular expressions. I researched the regex API documentation ... part of the pattern .. The problem is that I found a code on the internet (which wo...
asked by 29.01.2018 / 01:29
1
answer

Using Regex in switch in jQuery

Well, I have a question here and I do not know if it's possible to do what I want (I think so). The question is, do I have a switch (link) and follow example of cases (example link): case " link ": break; case " link ": break; case " li...
asked by 07.03.2015 / 00:18
1
answer

Regex in word XML

I have an xml that came from a docx in this format: <w:p w:rsidR="00AE2D8E" w:rsidRPr="00AE2D8E" w:rsidRDefault="00AE2D8E"> <w:pPr> <w:rPr> <w:lang w:val="en-US"/> </w:rPr> <...
asked by 27.08.2018 / 22:04