Questions tagged as 'regex'

2
answers

Duplicate Normalizer + Regex

Could someone explain the code below? returnStr = Normalizer.normalize(returnStr, Normalizer.Form.NFD) .replaceAll("[^\p{ASCII}]", ""); returnStr has a url as its initial value.     
asked by 23.06.2016 / 21:46
2
answers

Remove HTML tags

In terms of efficiency and performance, which code is the best way to remove HTML tags in a string? Option 1: string ss = "<b><i>The tag is about to be removed</i></b>"; Regex regex = new Regex("\<[^\>...
asked by 23.11.2015 / 20:13
3
answers

Capture the WHERE clause of an SQL query

I need to capture only the where clause of multiple queries to parse the filters used. For example: select "DIM_1"."col1", "DIM_2"."col2" , "DIM_3"."col3" , "DIM_4"."col4" , "FAT_1"."col5" from "FAT_1", "DIM_1", "DIM_2", "DIM_...
asked by 22.12.2016 / 19:05
2
answers

Error Deprecated: Function ereg ()

In script that I installed gave this error:    Deprecated: Function ereg () is deprecated in /home/u844214382/public_html/functions.php on line 98 Deprecated: Code on line 98: if (ereg("^[a-zA-Z0-9\-_]{3,20}$", $mensaje)) { There...
asked by 05.04.2014 / 00:27
2
answers

substitution with regular expression - reference followed by number

Situation I was performing a replace of some data when I came across a peculiarity. |C405|01102015|7|1058|174544|19836903,14|18657,06| |C405|02102015|2|1059|174792|19859872,19|22441,55| |C405|03102015|3|1060|174953|19872892,09|12993,90| |C4...
asked by 06.11.2015 / 14:15
2
answers

Filtering records of a String Array by space-separated words in Java

How do I filter the records of a Array by using the search terms separated by spaço ? Example: I have a% of String% with the following records. bottle opener box with blue padlock 30mm brass padlock with 03 keys 100mm scre...
asked by 07.05.2015 / 20:34
1
answer

How to capture only the first part of a text that fits the regex?

<END>Av. Dr. Walter Belian, nº 2.230, Distrito Industrial, João Pessoa-PB, com CNPJ nº 07.526.557/0013-43 e Inscrição Estadual nº 16.218.7157; (NR) II - Sergipe, localizada na Rodovia BR-101, s/nº, km 133, Distrito Industrial, Estância-SE,...
asked by 22.01.2017 / 03:06
2
answers

Regular "permissive" expression to detect allowed extensions and hosts

I have a list with some links https://www.exemplo.com/ https://www.exemplo.com/home/ https://www.exemplo.com/logo.png https://intranet.exemplo.com/ https://admin.exemplo.com/login https://www.exemplo.com/sobre/ https://www.exemplo.com/shell.ph...
asked by 18.06.2016 / 22:31
2
answers

How to extract a specific excerpt from a string

Let's get this extracted URL /ac/rio-branco/xpto-xyz-1-0-16-5-abcd-a1G57000003DE4QEAW And I want only the snippet that begins with a1G , does anyone know how I can only get this snippet?     
asked by 26.02.2016 / 21:14
1
answer

Regex get more than one occurrence in a string

I have my regex (\d{2}) . And I have my string 12 hoje vai 45 na serra pelada 55 ou 75 . How do I get my regex to get all occurrences of the string? She's just getting the last one.     
asked by 13.03.2015 / 19:11