Questions tagged as 'regex'

2
answers

Creating a regex for vowels in C

I need to create a regex that checks if a word contains vowels, and after creating this check, I'll cut the vowel parts of this word, but I do not know how I can create a regex in C. I saw some code like this: int reti; reti = re...
asked by 15.06.2017 / 17:20
1
answer

Redirect domain to given server folder via htaccess

I have two domains that point to my server, both for the public_html root folder. I need each domain to access a particular folder. Example: www.dominio1.com.br points to the folder / domain_1 www.dominio2.com.br points to the folder /...
asked by 12.06.2017 / 16:14
2
answers

Find term and capture text immediately or after space

I have some payment logs and these are the defaults they created the file: Pattern 1 Apelido -- isso é um espaço Fulano de Tal Pattern 2 Apelido: Fulano de Tal Pattern 3 Apelido: Fulano de Tal How can...
asked by 10.06.2017 / 07:19
1
answer

Error Delimiter must not be alphanumeric or backslash [duplicate]

Good afternoon guys from stackoverflow. Is there a way to do this? I've been trying, using this way: for($i = 0; $i < count($array); $i++){ if(preg_match( "\d{1,2}/\d{1,2}/\d{4}$" , $array[$i] )){ echo 'true';...
asked by 18.04.2017 / 20:54
2
answers

I want mongodb with regex

I'm trying to find the best way to make this search in mongodb. I have this number 42999234180 and I have a table of prefixes that range from 3 to 7 characters, I would like that when searching for 4299234180 it would return the value that was m...
asked by 21.03.2017 / 21:49
2
answers

RegularExpression allow greater than 0.00

False value: 0,00 -- false True value: 0,01 -- true 0,10 -- true 1,00 -- true 10,00 -- true 100,00 - true 1.000,00 -- true 10.000,00 -- true 100.000,00 --true 1.000.000,00 -- true 10.000.000,00 -- true 100.000.000,00 -- true 1.000.000.000...
asked by 07.03.2017 / 21:07
1
answer

use of regex in a switch

I'm trying to use regular expressions to validate a switch, however, it occurs to me on the console that "day.match" is not a function: function dayOfWeek(day){ var regex = /[1-7]/g; if(!day.match(regex)){ day == 8; } switch(...
asked by 20.10.2017 / 19:01
1
answer

regex java replace all

String url = "/users/{id}/books/{id_book}"; url = url.replaceAll("{\w*}", "\w*"); System.out.println("result url:" + url); Trying to do a replace with regex, and returns me the following error: Exception in thread "main" java.util.regex.Pa...
asked by 11.03.2017 / 13:22
1
answer

About Regular Expression in PHP - How to Take Part of a Text? [closed]

I'm having trouble catching part of a text from a page on the WikiPedia . I can get the title like this: $content = file_get_contenst("https://pt.wikipedia.org/wiki/Conserva%C3%A7%C3%A3o_da_natureza"); preg_match("/< title>(.*?)&...
asked by 26.09.2016 / 01:23
2
answers

Regex Python Searching dates

resultado_limpo = ((busca.find_all(string=re.compile(r'\d{2}\/\d{2}\/\d{4}\n\t\t\t\t\t\t\t\t')))) I'm trying to fetch dates in dd / mm / yyyy format I need to search with only year 2016 and have how I put the month in the variable case inside...
asked by 19.09.2016 / 13:06