Questions tagged as 'regex'

2
answers

How do I make "Replace" replace all occurrences of a word regardless of case?

The Replace function replaces all occurrences of a word or expression, but is case sensitive: string str = "Hello WorLLd";//Substitui só os 'l' e não o 'L' str = str.Replace("l", "EL"); Console.WriteLine("My string: " + str); Output:...
asked by 11.09.2014 / 23:16
2
answers

What is the value of \ 1 in the regular expression in javascript?

I was taking a look at this response from @Sergio here on the stackoverlow: link There was a snippet of code like this: /^(\d)+$/.test(111) What exactly does do in this regular expression?     
asked by 22.10.2015 / 21:54
2
answers

How to remove a word from a string without changing larger words that contain it

I would like to remove a word from a string in R. I was doing the following: > s <- "ele esta bem mas tambem esta triste" > stringr::str_replace_all(s, "tambem", "") [1] "ele esta bem mas esta triste" So far, so good. The problem...
asked by 24.02.2016 / 14:30
3
answers

Replacement of variables in the body of the message

I am creating a message profile system, when the system performs a certain action it picks up a certain profile and triggers the message as email , however I would like it in the message body when writing {{variavel}} would like it to t...
asked by 16.05.2015 / 21:47
2
answers

Multiple regular expressions in a string with bars

I need a regular expression that matches the end of a URL in the following format: /somente-letras/somente-numeros[/] To combine the part of somente-letras , I used ~^/[A-Z]+$~ , however from the moment I put a bar, nothing else...
asked by 16.12.2015 / 17:28
3
answers

Get the name of the Image in the URL

I need to get the image name in the url. /data/data/com.intel.appx.IZICondominios.xwalk15/files/_pictures/picture_006.jpg I need you to come back:    picture_006.jpg The URL template is not fixed, every situation can change. You can...
asked by 19.12.2015 / 17:50
1
answer

Regular expression to change the pair of variables in mysql in PHP file

What expression can I use to be able to change MYSQL function parameters, eg: mysql_query($query,$db); mysql_query($db,$query); Because I search for mysql_query and change to mysqli_query after I can make that change. That is, replace t...
asked by 27.06.2017 / 17:24
2
answers

use regex in explode function of php

I'm doing a query to my DB, and we can make an identical query to this:    "hello world" "pacific ocean" What happens is that I can search multiple strings at once:    Expected result:       String1: Hello world       string2: paci...
asked by 17.08.2015 / 13:46
1
answer

Regex within SQL Server

How to recover fields with the following pattern? a111/1111 or a111_1111 or a111-1111 or a111+1111 where: a = some letter of the alphabet; 1 = any digit of 1-9; I mounted a Regex that is working...
asked by 07.12.2017 / 15:21
1
answer

Check string Regex C #

I have a string that can only be composed of X uppercase and - . Example: X-XX-XX or X-X-X-XX-XXX . Where every - would count one group and each X one digit. Example 1: The string X-XX-XX has 3 g...
asked by 20.12.2016 / 19:57