Questions tagged as 'regex'

2
answers

Error with regular expression in PHP

Would anyone know to tell me why this regular expression of the error in PHP? /:[^\/\]*/ It is being used this way: return '/' . preg_replace('/:[^\/\]*/', '([^\/]*)', $value) . '/'; I'm trying to "break" one counter against another bu...
asked by 03.05.2014 / 20:51
2
answers

Picking date and time from a string

I want to "filter" string to get only the date that is in it, string is in that format:    SSC Napoli v Dnipro - Thursday 05/07/2015 04:05 PM What I want to get is just 07/05/2015 16:05 , I used explode : $data...
asked by 09.05.2015 / 01:23
2
answers

Regex in dynamic string of X characters, in dynamic content

Next, I have a page that generates content scrambled with dynamic and non-dynamic strings, I need to get a dynamic value between the | tabs, it contains random data / strings that change when loading the page. The variable I want to get h...
asked by 13.06.2015 / 07:44
1
answer

Regex for python float validation

   r "[+ -]? \ d *.? \ d +" This regex is accepting numbers with more than one point Ex: 12.23.43 and was not to accept ...     
asked by 31.03.2017 / 18:23
3
answers

"Find and replace" with regular expressions in MS Word 2016

I have a list with result of the candidates of a public contest that I want to sort by note. However, before making the necessary classification remove the registration number of each competitor, which follows the following format, for all:...
asked by 21.06.2017 / 21:15
3
answers

Extract date with Regex

I'm trying to extract a date from a String, but I'm not getting it. Example: String stringQualquer = "um teste qualquer12/02/1998 19/09/1880 Nulo"; I want to get the first date of this example "12/02/1998". I tried that, but it did no...
asked by 02.08.2018 / 21:35
2
answers

Regular expression AWK print inside brackets

look, inside my.txt file has the following description: Flags: X - disabled, E - established 0 E name="peer1_cymru" instance=default remote-address=38.xx.xx.xx remote-as=65555 tcp-md5-key="WUf4f8" nexthop-choice=default multihop=ye...
asked by 07.07.2017 / 17:46
2
answers

How to remove all occurrences of "/" from a string using Javascript

Hello, I'm having trouble applying a simple regex with Javascript. So: var str = "/Date(1421287200000-0200)/"; console.log(str.replace('/\//g','')); //não funciona, mesmo estando certo console.log(str.replace('/[/]/g',''));...
asked by 24.11.2016 / 18:07
2
answers

Regular expression to retrieve strings that begin with a colon (:)

I need a regular expression to retrieve a list of strings that start with the colon (":") and end with the space character or end of parentheses (")"). > Example: String texto = "(:TEXTOQUALQUER NADA DO FOI :TEXTOQQDENOVO SERÁ DE NOVO :TEX...
asked by 11.12.2014 / 20:15
1
answer

Regex that captures data entered by user, typed in a phrase

If I have a sentence: "melhor 01/01/2016 - 05/01/2016" How can I retrieve the dates of this sentence using regex?  thus: var data1="01/01/2016" , data2="05/01/2016"     
asked by 18.05.2016 / 21:05