Questions tagged as 'regex'

1
answer

InputMask by model

Hello, I'm using the jQuery - maskedInput plugin, where I get the id of my input and make the mask: $("#CPF").mask("999.999.999-99"); is working, only I would like to use this mask through model , wit...
asked by 25.11.2015 / 17:31
3
answers

Change characters within a string, in a string

Simple question: I just want to replace the A characters inside the " " field and not what's outside with a B, eg aaaaaaaaaa"aaaa"aaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaa"aaaaaaaaaa"aaaaaaaaaaaaa look like this: aaaaaaa...
asked by 16.06.2015 / 01:58
2
answers

Regex - taking certain values - PHP

I'm in doubt, tried to read several articles about regular expressions, but it still did not fit my mind, I'm confused. I have a certain string vid..0002-3f3c-458c-8000__vpid..e29ac000-8020-395e__caid..8ff77872-a0cb-4d7c-a36c0bd6__rt..D__lid.....
asked by 07.09.2015 / 16:09
1
answer

Format file names using Regular Expression

I'm trying to rename some files using Regular Expression, but I'm stuck in a specific format. I have video files in this format:    Yu.Yu.Hakusho Ep.001 - The Death I need to format using regex for:    Yu.Yu.Hakusho.S01E01 - The Death...
asked by 16.04.2016 / 02:36
1
answer

Identify if and endif with regex?

In an example of OS I found: <?php $a = 22; $b = 33; $template = ' [if $b>0 ] B > 0 [/if]'; // IF - ENDIF preg_match_all('/\[if(.*?)\][\s]*?(.*)[\s]*?\[\/if\]/i', $template, $regs, PREG_PATTERN_ORDER); for ($i = 0; $i < coun...
asked by 20.09.2016 / 00:30
2
answers

Regex time greater than 00:00

I am developing a validation regex using System.ComponentModel.DataAnnotations and RegularExpression of asp.net mvc C #, in this regex it is necessary to validate time duration without limits in hours and the time must be greater t...
asked by 28.12.2014 / 18:57
1
answer

How to replace a series of blanks by just one in a string in R?

How do I replace a series of blanks with just one, in R? For example, suppose we have a string: x <- " non non non non" I want to make the content of x be "non non non non".     
asked by 08.01.2015 / 18:46
1
answer

How to escape all metacharacters using Pattern.compile (..)?

File:    ftp: //paginaqualquer.html       link       link My code: public static void main(String[] args){ //Supondo que o readLine() esteja no loop != null String arquivoLinha = arquivo.readLine(); Pattern padrao...
asked by 27.03.2016 / 00:06
1
answer

How to delete texts in parentheses with regExp?

I'm developing an HTML5 application that uses the Wikipedia API to give the definition of what we ask. I used the code they made available in a forum in another Stack language, and in it I noticed the use of regular expressions to eliminate cert...
asked by 29.11.2014 / 02:35
2
answers

Regex between words

I'm trying to make a query Regex that returns me in a source code file statements that are not public %%Enum Tipo , however I'm not very familiar with Regex and I'm having a bit of trouble, hint how you can do this. Basica...
asked by 17.11.2014 / 18:03