Questions tagged as 'regex'

1
answer

Using regex in Twitterrific, how do I mute all the tweets of a user that do not contain a link?

Of a user I am only interested in tweets that contain links, as they are articles or news, but not tweets with personal opinions or comments. Using regex I already have several rules, but I do not know how to "just pass tweets that contain a url...
asked by 22.04.2018 / 09:11
1
answer

preg_match () does not extract all matches

I have this little PHP code: <?php $r = file("id.txt"); $content = implode(" ",$r); if (preg_match('#"name":[^"]*"([^"]*)"#', $content, $datos)) { $mp = $datos[1]; } else { $mp = 'error'; } echo $mp; ?> That is responsible f...
asked by 24.09.2017 / 05:33
1
answer

Get the text inside the tag b

I have a chain with information of this type: $texto = "cualquiercosa<b>contenido</b>cualquiercosa"; $resultado = preg_split("<b></b>",$str) However, the result does not bring the text between the labels. Could you...
asked by 05.10.2017 / 00:32
1
answer

In Python Pandas how can I filter a dataFrame with part of the content of a string?

I have a dataFrame that has a column named 'linea' . I want to filter the dataFrame only with the lines that have the word "GRANEL" in its content and discard all other lines. To filter currently I use the code: lista_produccion_t...
asked by 19.01.2018 / 20:37
1
answer

Save parts of a String in different variables using regular expressions and java split function

I have a problem with these regular expressions. Based on the following code and knowing that the content of wemcamDetails is: USB\VID_04F2&PID_B2E1&MI_00&9F9657C&0&1200 : Lenovo EasyCamera Code: String...
asked by 08.02.2017 / 19:48
1
answer

Replace a route with regex. Error: "character to be escaped is missing"

I have a program that detects every time a new file is created, and I want to copy that file to a new location. My problem is that I do not know how to do to remove the piece C:\Archive and delete it for the new location. ruta = ruta...
asked by 22.02.2017 / 20:11
2
answers

Regex in javascript that selects something that on its sides (left, right or both) does not have certain terms

I am trying to find a regular expression that selects me those spaces in whites that on its left side, right side or both have any word except a specific word. The regex must obtain the following result: Internal spaces that you should...
asked by 13.10.2016 / 03:32
1
answer

Extract url from a header using bash script

I have been trying for quite some time to extract part of a text (a header) in bash script but I have not succeeded, this is what I have: link: <https://api.some.com/v1/monitor/zzsomeLongIdzz?access_token=xxSomeLongTokenxx==>; rel...
asked by 04.02.2016 / 19:32
1
answer

Delete all points with gsub

I want to know how to correct the code to delete a character (period) in an identity number variable (eg: "2.564.752" convert to "2564752" ). Instead of deleting just that character, it ends up deleting all my variable, would you...
asked by 01.02.2018 / 15:00
1
answer

Regular expression for django url with slug containing "/"

The idea is to create a regular expression to configure the url I have 2 models, category and articles. The article model has a FK to category and the slug makes the join correctly slug (category) / slug (article). I want to use the separator...
asked by 23.08.2017 / 05:13