Questions tagged as 'regex'

1
answer

Regular expression capturing whole line

I need an expression to intercept the entire contents of a line, starting with a specific word and going to the line break. In this section everything can happen, I need you to identify everything without discrimination. In short, I know how...
asked by 14.06.2018 / 16:36
1
answer

How to validate valid characters for latitude and longitude during typing?

I have a text input for latitude typing and another for longitude. I would like the field to allow typing only the characters valid for latitude and longitude. I believe the field should only accept numbers, "." and "-", correct? At fir...
asked by 28.03.2018 / 21:04
1
answer

preg_match_all, regular expression in php with variables

Hello, I'm having trouble with the regular expression, and the function returns 3 positions in the array all empty; preg_match_all('/<a data-role\="sku\" data-sku-id\="'.$the_new_id[2].'\" id\="sku\-3\-'.$the_new_id[2].'\" href\="javascript...
asked by 18.03.2018 / 22:34
1
answer

Regular expression that returns next words

Well I'm working on a regular expression that picks up license plates, my interest would be not to just pick up the plates, but like things close to it, for example: |Placa:AVX-4300 Fiat Uno | Here is the expression that I am using...
asked by 11.03.2018 / 20:45
1
answer

Filter array of objects by key

At the moment it is returning only if the string to be queried is exactly like the object key let estilos = { "alignContent": [ { "ativo": false } ], "alignItems": [ { "ativo": false } ], "alignSelf": [ { "ativo": false } ], "alignmentBa...
asked by 11.03.2018 / 03:22
2
answers

Regex to leave first letter of full name capitalized, even with special character [duplicate]

I have the following variable in $ scope of Angular JS, with an arrow function: $scope.cad.nome.toLowerCase().replace(/\b\w/g, l => l.toUpperCase()); I need to format your content, which is someone's full name. It is working until the...
asked by 23.02.2018 / 18:29
1
answer

Preg_Match w / regular expression

I need to remove everything around the link below. I'm using preg_match with regular expression, and since I'm new to the area, I'm having trouble finding my error. Could you please help me out? How do I do: preg_match('/www.facebook.com/pl...
asked by 22.02.2018 / 19:32
1
answer

REGEX to get information inside a string

I'm studying PHP OO and part of my study is in putting together a Class that works a template engine. I've converted the file to a string with file_get_contents and now I want to get a part of that string to generate a LOOP. {LOOP} <opti...
asked by 10.01.2018 / 05:28
1
answer

How to load data from an XML file into an HTML input field?

I'm trying to load an XML upload by saving on an object and showing it on the screen. I was able to do showing in a Div But I'm not able to show in Inputs. Follow the process and the code: I choose the File and click Upload Theresul...
asked by 25.01.2018 / 21:59
2
answers

Regex only on first occurrence

I'm using the sublime and would like to do a bulk replace. My texts are in this pattern: ABC ("Teste regex I would like to remove the space after ABC and should look like this: ABC("Teste regex What would be the regex...
asked by 04.01.2018 / 18:43