Questions tagged as 'regex'

1
answer

Edit LaTeX snippets in Sublime Text 3

In the following snippet of the package LaTeX (Sublime Text 3) every time I enter a espacio , * , ? or . in the part of : label{sec:*********} y % section ********* (end) substitutes the characters...
asked by 12.06.2016 / 08:15
2
answers

Regex to remove accents and grave accent from a txt

I would like to know what regular expression I can use, I have a txt from which I have to remove the vowels labeled (Á, É, Í, Ó, Ú), single lines (',') and replace with the same vowel without tilde or space (_) but without changing the fact that...
asked by 04.01.2019 / 00:55
1
answer

Problem with RegularExpression in Data annotations

Hi, I'm doing a form and validating with data annotations but I need my user to have no intermediate spaces the problem is that my regulation is not working, could you help me find a solution please. Here is my expression. [Display(Name...
asked by 03.01.2019 / 23:01
1
answer

how can I substitute a date using compile_obj.subn?

I do this for fich in ficheros: coincidencias = re.search(patron, fich) #print(coincidencias) if coincidencias: print("coincide ----------------------->"+fich) Result C...
asked by 22.11.2018 / 14:10
1
answer

Words with length three

I want to make a query that erases the words with length less than 3, that is to say in the phrase "alambre de puas 25 km" that remains "alambre puas" , I tried this query but it does not work. Any ideas? Select REGEXP_REPLACE(col...
asked by 26.10.2018 / 20:20
1
answer

Why does this method return me the wrong amount of matches?

public int obtenerNumOraciones(String texto) { Pattern patron = Pattern.compile("[a-z]*"); Matcher match = patron.matcher(texto); int cant = 0; while(match.find()){ cant++; } return cant; } If I put text = hel...
asked by 07.10.2018 / 07:35
1
answer

Enter variable in regular expressions

I'm trying to pass a variable to a regular expression (so I can modify it to my liking) in this case I want to enter a number so that I can control the number of digits allowed. I can not make it work, or pass it as a separate string ... noth...
asked by 27.09.2018 / 23:22
1
answer

take part of an Android Studio string

I'm trying to take part of some SMS in an android application, the idea is that the sms just take the link, but the problem is that sometimes it can contain more or less characters and be located in different parts of the message for which I can...
asked by 31.10.2018 / 19:55
1
answer

How to redirect a url with regular expressions

I am using the redirection plugin and I want to redirect from a category url to an article url. Of https://www.misitio.com/perros-gatos/razas/page/12/ a Destination URL: https://www.misitio.com/razas/ What I had done was r...
asked by 08.08.2018 / 19:33
1
answer

Regular expression coma search

I'm trying to create a regular expression that captures every line ej an expression to find the first comma another that looks for the second comma and so on. Santa Elena.- FOJAS 8148 NUMERO 11796 del año 2016, a FOJAS 8148 NUMERO 11797...
asked by 02.08.2018 / 22:40