Questions tagged as 'regex'

0
answers

Nginx block | redirect url files

I'm creating a url shortener in my ex-subdomain (go.domain.com) to serve as an external reference, eg // a url de uma pagina (extensa) www.domain.com/user-2124532544454343dgfs-pages-artes-31234124141241241212xxxx // ficaria assim: go.domain.c...
asked by 18.09.2016 / 20:24
1
answer

Find commas in the parameters of a function using regex

I need to find the occurrence of a string function call, but I need to include the case where there is more than one passed parameter, such as: Tower.getType(i,j).initialPrice(f,g); So far I have only been able to formulate the regex when t...
asked by 25.08.2016 / 22:26
0
answers

I have a question regarding regex

Well, how do I pro regex identify that I'm wanting to get the first closing of a tag ie I wanted to get hold of the first line of the li tag and soon after I wanted to make a foreach to go capturing line by line. But I do not know how to do...
asked by 17.07.2016 / 16:28
1
answer

Regex - pricing validation for MySQL decimal (12,2)

I have a form where there is a price field that will be populated by the user. The goal is to accept some entries and block others (validation). The value will be stored in a MySQL database in a decimal (12,2) field. This means that this fie...
asked by 19.05.2016 / 18:08
1
answer

Duvida replace function javascript

Someone can explain to me what these parameters mean within the function replace (/</g) , (http:\/\/\S+)/g function escape(s) { var text = s.replace(/</g, '&lt;').replace('"', '&quot;'); // URLs text = text.rep...
asked by 14.02.2016 / 01:58
1
answer

Capture part of a string within a couple of characters using regex

I'm trying to solve a problem of exchanging words between <> . For example, I have the following string: <><PALAVRA outrapalavra>palavra</PALAVRA> In addition to this string, I get a parameter that indi...
asked by 29.01.2016 / 19:00
1
answer

Return separate characters in the same result

Is it possible to get two characters that are in different positions inside the string in the same match (preferably the last one)? For example:    "xxxx a 12 b " - > "ab"       "xyxyyxxxxx c 23 d " - > "cd" I know where...
asked by 30.12.2015 / 19:22
1
answer

Is the validity test of RegExp correct?

I am trying to validate a password through RegExp, in javascript, but it only returns false when in fact it should return true, for having given match in value, would anyone know if there is anything wrong with my code? $scope.verifyPasswo...
asked by 23.10.2015 / 14:56
1
answer

Dot-Star problem in Regex

I am trying to create a parser of robots.txt with Regex but I can not make the expression to be right. I ran several tests on Regex101 and still did not achieve an expected result. My regular expression: /user-agent: (bot|\*)\n*((dis...
asked by 05.07.2015 / 08:22
1
answer

Intersection and Subtraction Clusters

I have a question regarding regular expressions. I do not understand how intersection and subtraction work in regular expressions. Could someone clarify me? [a-z&&[aeiou]] Interseção [a-z&&[^m-p]] Subtração System.out.prin...
asked by 15.02.2015 / 00:36