Questions tagged as 'regex'

2
answers

php regex to get 2 href link groups

Hello, how to set up a REGEX to get 2 groups of all the href link <a href="/page/page/categoria/page?page=2&amp;publica=1" rel="next">2</a> Where group 1 would be the entire link /page/page/categoria/page?page=2&amp;pu...
asked by 17.09.2015 / 03:00
1
answer

Abstraction of code with several Replaces

I have this code block: xml = xml.Replace("<html>", ""); xml = xml.Replace("<head>", ""); xml = xml.Replace("</head>", ""); xml = xml.Replace("<body>", "<certidoes>"); xml...
asked by 15.07.2015 / 14:51
1
answer

Replace occurrences arbitrarily in JavaScript

I'm using the replace() method to highlight certain words in a sentence. The method replaces only the 1st occurrence of the target word by default. I would like to know how perform arbitrary overrides . Ex: Replace the 2nd sentence of...
asked by 15.03.2015 / 03:17
1
answer

Regular Expression Problems

I have the following beginning of function sql that I will use for a procedures / function recreation system in C # Create Function dbo.JN_FN_DataAtual(@TESTE INT) And I created the regular expression (?si)\bCREATE\s*\bFUNCTION?\s*(?&l...
asked by 14.08.2015 / 04:16
1
answer

Remove URL parameter with JavaScript

I'm creating a feature for a system and I came across the need to manipulate URL parameters, so I would like to know how to delete a certain parameter from the URL? Here's a clearer example: http://site.com.br?c=cliente&a=editar&id=...
asked by 22.01.2015 / 22:54
1
answer

Match fraction number javascript

I have a script and in one of the lines: return $flag.text().match(/[0-9 ]+(?=\%)/i); read the numbers of a tag p . Ex: <p>Desconto 15%</p> In case it will read the number 15. From what I know this line does...
asked by 22.01.2015 / 12:52
1
answer

String with spaces - Regex IsMatch returns true when it should return false

I have the following Regex (?=.*\d)(?!.*\s)(?=.*[a-zA-Z\s]).{6,12} If I do tests on site that test Regex, it works, in the Model annotation of the view to validate it works, but when I do in the regex.IsMatch(" qqq11") service it ret...
asked by 11.07.2014 / 14:05
1
answer

How to use \ t (tab) on outputs with EOF?

See the example below: cat << EOF alias\tVARIABLE = command EOF The run output does not take into account the regex \t .     
asked by 23.12.2018 / 02:36
2
answers

Append .html extension to the end of all links in multiple files (with Shell Script)

Hello. I have a lot of HTML files that have links in the following format: http://localhost:8080/tag:alguma_coisa and I need to add the .html extension to these links so they look like this: http://localhost:8080/tag:alguma_c...
asked by 13.05.2018 / 19:10
4
answers

Validation for Phone type field

Would anyone have any validation for phone type field? Where the user can not put fictitious numbers in the field as sequences of number (99999 8888 123456) or something of the type?     
asked by 12.03.2018 / 14:58