Questions tagged as 'regex'

1
answer

Define a group in regex

I'm testing the following regex: (?i)(\s|\W|)(fire|fire-type)(\s|\W) I have 2 problems: 1st case (SOLVED) has only one word without spaces at the beginning or end my regex does not catch. Ex: fire In my group I have a fire-type...
asked by 15.12.2016 / 16:47
2
answers

Replace string with regex in python 3

I have a code that overrides certain string by whitespace dados = '[{"Id":12345,"Date":"2018-11-03T00:00:00","Quality":"Goodão","Name":"X","Description":null,"Url":"x.com.br/qweqwe","ParseUrl":"x-art","Status":"Ativa","Surveys":0,"KeySearc...
asked by 05.11.2018 / 00:40
2
answers

How to remove a part of the string at the beginning or after the space?

I need to change names beginning with HE by E such as HELIANE HELIAS for ELIANE ELIAS But it can be GUILHERME HENRIQUE and switch to GUILHERME ENRIQUE     
asked by 10.08.2016 / 22:34
3
answers

Regex to ignore invalid filenames

Hello, I'm trying to add a regex in app.yaml to ignore files with strange names in Google App Engine , but it is not working. My regular expression: skip_files: - [.\~#%&*{}:<>?|\"-!] I'm getting this error:    appcf...
asked by 20.01.2016 / 20:56
2
answers

Regular expression to create a line of a rooster game (old game)

I'm trying to use a pattern to find a certain line in a file, but it's not working. This is my pattern: row = re.compile(r"(|\s[OX\s]\s{3}|)") With this I want to basically find this pattern: | | O | X | , that is, I want th...
asked by 24.11.2014 / 16:33
2
answers

How to give replace RegExp in editable div using Javascript?

I have an editable% color where I can capture the whole text inside it. Dai I want that in every occurrence of a certain word that word be replaced by another. Very simple. The code I tried did not work. It itself works only that the output...
asked by 24.12.2014 / 12:35
2
answers

Using RegEX to get a certain value

Am I using this "string?" in regex ^\/(.*)\w+$ it detects values that start like this: /STRINGQUALQUER would like to get STRINGQUALQUER , what code do I use? I use jQuery.     
asked by 29.11.2014 / 16:39
2
answers

How to replace a space with a semicolon between two words with gsub ()

I have a problem to solve and I can not write the correct regex. I want to add a semicolon between two emails: ex <- "[email protected] [email protected]" #resultado esperado: [1] "[email protected];[email protected]" Thanks for the help!   ...
asked by 26.07.2018 / 22:00
3
answers

Regular expression, PHP

What is the correct way to validate the string for the nomenclature below, using regular expression? /filmes/todos-filmes/notas-espectadores/?page=[SÓ NUMEROS]     
asked by 22.01.2017 / 23:44
3
answers

First and last occurrence of character

In JavaScript, how do you extract from a string anything between the first occurrence of [ and the last occurrence of ] ? Ex: <HR>\n[{"key":"value","key2":["¥"]}]\n<HR>     
asked by 06.07.2017 / 13:23