Questions tagged as 'regex'

1
answer

Return all results using preg_match

I need to return some results of the "ex: Digital Agency" search of the first page of Google using preg_match + RegEx, but it is not returning all 10 values in the array, only the first. How do I solve it? Ex: $document = file_get_contents(...
asked by 21.05.2014 / 18:18
2
answers

Simplify the use of multiple replaces all

I have the following var res; $(window).load(function(){ $.get("http://ipinfo.io", function (response) { res = JSON.stringify(response, null, 4); res = res.replace(/:/g, ''); res = res.replace(/\"/g, ''); res = res.replac...
asked by 19.04.2017 / 19:12
2
answers

Regex | Catch separate group [closed]

This tag repeats changing the content and would like to know if you can get each content separately TextBox TXTTESTE = new TextBox(); TextBox TXTTESTEDOIS = new TextBox(); TextBox TXTTESTETRES = new TextBox(); ListBox LBTESTE =...
asked by 15.04.2014 / 22:29
1
answer

Extract existing value between two tags with regular expression

How to check from a regular expression if there is a certain value between two strings, for example, the tags <code> and </code> ? I want, for example, to know if there is a value between "03" between the two tags. Ho...
asked by 17.03.2016 / 19:53
1
answer

How to get specific text from a string with Regex?

I'm trying to manipulate the return of a string where I need to always get the where block from the select problem so my method always returns different strings. For example: SELECT..... FROM..... WHERE ( ( UPPER(I...
asked by 05.02.2016 / 11:52
1
answer

Regex backreference within group with OR

I am trying to reference a value inside an "OR". Example, I have the text inside the file: CREATE TABLE ABC; ALTER TABLE ABC; I need the ABC (table name) of ALTER to be always equal to CREATE , already tried the followin...
asked by 26.12.2018 / 15:21
1
answer

Create a regular expression to validate at least three characters (accepting spaces)

I'm using this in my code: <input required pattern="[a-zA-Z0-9]{3, }" title="Por favor, preencha pelo menos 3 caracteres entre letras e números." type="text" class="form-control" id="pesquisa" name="q" placeh...
asked by 09.08.2018 / 15:19
1
answer

How to apply regex, using C # in a pdf file? [closed]

private static string BuscaComparacao (string url) { Regex r =new Regex("\S+\D{3}[.]\D{3}\S+\D)"; var result = r.Matches(url); return result[0].ToString(); } The code does not find the data I ha...
asked by 26.07.2018 / 17:57
2
answers

Quantify new line (\ n) in regex

Is there any way to quantify many paragraphs without being literally to use with PHP ? \d{54} , for example it represents 54 digits, but you can not use \n{54} . I want one regex to get a data that is 54 new lines from th...
asked by 04.10.2017 / 03:55
1
answer

Regex - Validating a string

Good evening guys, I'm having trouble forming a Regex that validates only the presence of lowercase letters and numbers. If anyone could help, thank you very much! Thanks     
asked by 19.12.2017 / 02:31