Questions tagged as 'regex'

1
answer

PHP Regex remove IMG attributes and change SRC

I have the following string with html : teste = "<img src="image/teste.jpg" alt="" width="32" height="32"> <p>teste</p> <img src="image/teste2.jpg" alt="" width="132" height="132">"; I would like a regul...
asked by 19.08.2015 / 16:50
2
answers

Paste text between two words with regex

I would like a light for my problem. My goal is to get the list below by dividing the blocks between the words LOREM and LOREM but I do not want to get the whole text that follows the end of the list pattern, as follows: LOREM :...
asked by 10.12.2014 / 18:56
2
answers

PHP: Get function argument with preg_match_all

Good afternoon: I'm picking up the value of calls to a particular PHP function straight from the source code. What I need is to scan each of the lines of the source code, and if there are one or more altext () function calls, get the argum...
asked by 19.06.2015 / 20:18
1
answer

Regular Expressions in VBA - Extract substring

In the text below, I would like a regular expression pattern, compatible with VBA, to extract the text located between the equal sign "=" and the first line break (highlighted in bold): Home Customer = WITH ABCD CLIENT R $ 0 - (0.00%) - Max....
asked by 28.09.2017 / 21:21
0
answers

Counting the number of IP connections to a web server on port 80. Is the regex correct?

I would like to count the number of connections per IP per second (on port 80) to a web server whose IP is 192.168.1.216. The entry for the count is a network dump file in the PCAP format (.pcap file) generated with tcpdump. The output will be d...
asked by 02.09.2017 / 17:42
1
answer

R - match and add string

n <- c("alberto queiroz souza","bernardo josé silva","josé césar pereira","alberto, q-s.","alberto, queiroz souza","alberto, q. s.","alberto, q c", "bernardo, j. s.", "bernardo, j. silva", "josé, c. p.", "josé, c. pereira") I have to find e...
asked by 16.08.2016 / 22:52
2
answers

Using the GREP Function

Hello, I have a .csv file with the zip code in the middle of the address, in square brackets. In some cases there is no zip, but there is always the [] set, possibly empty, for example: RUA ESTEVAM DE ARAÚJO DE ALMEIDA 521 L 17 Q. 15 [23028...
asked by 17.12.2015 / 19:20
1
answer

Doubt with Regex

Good evening. I need a regular expression that can capture numbers / expressions before and after a given character, such as this ^ . For example, in the string below I need it to return (5 * 77 + 4)^6 and 7^3 : 5! + 8...
asked by 21.12.2015 / 03:36
1
answer

REGEX - How to capture blocks from CASE WHEN ... END

Good morning, guys. I'm trying to make a regex to capture blocks from CASE WHEN ... END. So, from this string: iduser + CaSe WhEn ("end") = 0 THEN 'CASE WHEN' ELSE ' END ' END + sum(iduser ) + CASE WHEN LANGUAGE = 3 THEN 4 ELSE 5 END...
asked by 18.07.2017 / 13:53
5
answers

Regular expression to find bar

I need to validate a field and it must have the following format: two_leths / numbers. Ex .: RN / 1234567. The two letters will always be uppercase and the number of numbers has no limit.     
asked by 12.07.2017 / 15:25