Questions tagged as 'regex'

1
answer

Regular expression decimal numbers

I am trying to create a regular expression for you to accept that type of numbering 1,111,111,0000 111,111,0000 0.0000 111.1111 The expression he was using was the following    [0-9] {1,2} [.] [0-9] {1,3} [.] [0-9] {1,3} [] \ d *...
asked by 06.07.2018 / 21:39
1
answer

Regular expression to extract the Amazon ASIN from a URL

I'm trying to extract the content of the ASIN code in PHP. And I have no idea what I'm doing wrong so that it does not return the string I want to extract. In this case, I want to extract the content only from the ASIN code ( B01ETRGE7M...
asked by 29.01.2018 / 13:06
1
answer

Get all matches between 2 fixed texts

I am using regex to get all search results on a page: <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">(NÚMERO ILIMITADO DE CARACTERES)</div> At first I think I have it right, but it does not work for me. $regex = '/\<div c...
asked by 17.12.2016 / 11:11
1
answer

Extract text from a string in R

I have a base from which I must extract part of the text, the name of the company. Here's an example: 995 945 Disprofa 741 593 63 56 302 292 351 Servicios 996 0 Terminal Puerto garin 740 Terminal 997 783 Las Las 740 871 -73 -51 142 203...
asked by 06.09.2018 / 16:13
1
answer

up to 10 integers before the decimal point with regular expression

As I can make a regular expression that accepts up to 10 integers a point and up to 10 decimal places, I have the following regular expression, but it does not work it only works with decimals /^([0-9]{0,10})+\.?[0-9]{0,10})$/     
asked by 05.10.2018 / 00:56
2
answers

How to validate in a reactive form of angular data entry so that they are only numbers?

I have a reactive form in Angular 5.2.0 . Configure the validations; nid, name, email, address. All work well, they show the right message in each case. But in the case of a (N.I.D.), which I ask accept only numbers, the error message appears w...
asked by 09.08.2018 / 15:39
2
answers

Regular expression to remove comments JS, HTML and CSS

I need a regular expression that works to remove comments from HTML, JS and CSS. The biggest problem I find is in the line comments. As in the project where I work there is a lot of JS to fire in HTML, if I try to detect // until end of line,...
asked by 08.08.2018 / 11:56
1
answer

Regex for php, check if a variable has 1 uppercase, 1 small, 1 digit and 8 characters minimum

I have a project in php, I am quite new programming and I never touch that language, my question is basically what the title says, I need to see if a variable has 1 uppercase, 1 lowercase, 1 digit and 8 characters minimum I currently have this i...
asked by 12.07.2018 / 18:01
1
answer

Compare several patterns with Pattern and Matcher in java

I have to read from a text file data line by line and, depending on what is on the line, apply a different pattern to recognize the information. This is a part of the file: [018-0001] type= category name= Distritos id= http://datos.madrid.e...
asked by 16.02.2018 / 23:58
3
answers

Remove $ and R $ in a string

I try to eliminate $ and R$ of a string. What I've tried is $scope.TotalOwed.replace(/\$\R$/g, ''); but it did not work for me.     
asked by 19.10.2017 / 19:02