Posts by Paz • 3,062 points
112 posts
-
2
votes3
answers199
viewsA: How to make a look-Behind using quantifiers such as the " d+"?
Regex without lookbehind (remembering that this way you need to access the group1 to get only "test".) \d*? (teste) Using lookbehind (this lookbehind identifies the use of 1 digit and space before…
-
4
votes2
answers1349
viewsQ: How to convert a nullable int to common int
I have a method that gets an integer that can be null, if it happens some executions of methods, but when I will use the same variable in a place that uses int which cannot be null, it appears that…
-
2
votes1
answer139
viewsQ: Regex to capture fixed strings in HTML and JS codes
I’m doing some automated testing for a project legacy in the MVC model, however, there is a requirement for one of them to capture all fixed strings in HTML and JS codes. Since the project company…
-
17
votes4
answers936
viewsQ: Why is the use of Dynamic something to be avoided?
My company works with development, it is a company practice that all codes made are reviewed by another person before they are approved in pull request. Usually my codes have only a few details to…
-
0
votes2
answers200
viewsA: Error validating with Regex
I advise you to use the replace as cited by the user @Marconi I find it valid to remember that one thing makes your case very difficult, you want to eliminate several special characters (-,*/&)…
-
2
votes2
answers1898
viewsA: Regex to pick up text between <> in python?
Your Regex is almost correct, what went wrong is that you used a quantifier Greedy (greedy) no point (.). This causes the regex to search until the last occurrence in which it can be embedded,…
-
1
votes1
answer141
viewsQ: How to remove improper commits from a remote branch?
The company I work for hires some interns who take care of tasks small of various languages and different parts of the program (in order to enable them), but recently one of our interns made some…
-
3
votes3
answers200
viewsA: How to pick up parts of a text in php
You should remember that in a regex there will always be a delimiter, when you mention that the files will have name. * and price. * is not enough to solve your problems, it just defines where regex…
-
0
votes1
answer313
viewsA: Regular expression in XML string
This regex captures the nonspecial characters that are between the tags <w:t> and <\/w:t> (<w:t>[a-zA-Z0-9]*<\/w:t>) She would return <w:t>oi</w:t> then you could…
-
1
votes3
answers210
viewsA: HTML tags with Regex
You should transform the possessive quantifier (possessive quantifier) +? in a greedy quantifier (Greedy quantifier) * <div class="teste">(.*)</div> This will make regex check to the end…
-
1
votes1
answer504
viewsA: I need to select sequences of numbers in a field of a table column
Try using this regex pattern to capture what you need. ([\n]|^)(?=ProNumber: (\d*-\d*)*) Since you did not specify if the number of digits contained in the sequence "123-456" can vary left the regex…
-
0
votes1
answer148
viewsA: Select an xml code snippet with regex
Try to use this ( *<testerconfirmation(.|\n)*?(?=<\/testerconfirmation>)<\/testerconfirmation>) Well I’ll explain in parts what each part does. *<testerconfirmation This regex…