Questions tagged as 'regex'

1
answer

Keyboard input type number

I am creating an app with angularjs and Ionic. I have some inputs type number but in the android device, the keyboard that presents me is with the option to add a period (.) And it is not what I need. I tried: if ( ($.inArray(e.keyC...
asked by 24.03.2017 / 18:06
1
answer

Validate input with jQuery and regular expressions

I am working with ASP.NET MVC5, and trying to validate an input with jQuery and regular expressions. What I'm trying to do is input only letters including 'ñ' and vowels with tilde. Code: $('#RazonSocial').on('keypress', function (e)...
asked by 20.01.2017 / 04:16
1
answer

Problem with regexp when using. * "

I am using the re module to extract data from a web. Specifically: link But I have a problem, if I do: re.findall('<a href="(.*)"', data) It returns me from the beginning of the href to the end of data. If I do: re.findall('<a...
asked by 08.07.2017 / 08:31
1
answer

Problems with a regex

I have this equation 2x ^ 2 + 7x-1 which by means of a regex removes what are the following characters: [x], [x ^ n]. to be able to solve them by means of of the general formula. This is my next code public void resolver(String msg) throws...
asked by 26.10.2018 / 21:29
0
answers

Help with RegEx in SublimeText 3 | sublime-syntax

1) To highlight a string, I use: - match: (") push: - meta_scope: string.quoted.double.ahk - match: (")(?!")|^ pop: true - match: \. scope: constant.character.escape.ahk With this I high...
asked by 22.04.2018 / 20:03
3
answers

Get text in quotes with regex in JavaScript

Through a textarea I am capturing what the user enters. My goal is to capture textarea, everything that is in double quotes, or single quotes. Note: It is assumed that there are no line breaks if the quotes have not been closed. p> For exa...
asked by 15.10.2016 / 19:42
2
answers

Replace text in PHP

I have a question, I have a sentence that I need to eliminate certain content, but respecting the whole sentence. For example, the idea is to eliminate the characters that come after the word por . $string = "Hace hoy un buen día para pa...
asked by 07.02.2018 / 13:20
2
answers

Reduce the substitution with "str_replace_all" in R

how can I get the str_replace_all when I make the first substitution (match) and stop looking for more matches in the dictionary code that I have. library(stringr) x <- c("VALLE PINO CORSO","LA PAZ","PAZ") dictionary bad words (malpa...
asked by 15.02.2018 / 23:23
1
answer

Add a space between each character

I try to separate the characters of a String by spaces using a regular expression. That is, 111 results 1 1 1 or ABC results A B C and the output should be a string. String nombre = "111"; nombre = nombre.rep...
asked by 25.03.2018 / 16:17
3
answers

How can I validate with regex that a question was asked?

How can I validate with regex that a question was asked? Is it possible? example: var text = "¿cómo estas hoy? pareces cansado" text.match(/([¿?]).*/)     
asked by 01.09.2018 / 15:11