Questions tagged as 'regex'

2
answers

Detect duplicate words with Regex

I'm trying to find all the duplicate elements in a sentence. To do this, I am testing with the following code, but I only detect the first duplicate word and I would like to replace all of them, regardless of whether they are uppercase or low...
asked by 04.01.2017 / 11:38
2
answers

Regular php expression between tags

I need to get this number 2769 inside these tags with a regular expression in php <td style="background-color:#b0c400;border-bottom:1px solid #ffffff;text-align:right;padding:0px 5px 0px 5px;color:#000000;">2769</td> I tried to...
asked by 26.10.2016 / 16:03
1
answer

regular expression for textbox length

How can I make a regular expression to validate that in the textbox enter a maximum of 19 digits and a minimum of 15? What I have is this ER but I think it's wrong var expreg = /^([0-9])*{0,25}$/;     
asked by 05.07.2016 / 22:01
1
answer

How to extract a number from an almost random string in C ++ using regular expressions [closed]

How to extract a specific number from a string that can have almost any shape, I explain: My string can be: cualquiercosa+CH+number+cualquiercosa that is: TEST-13?:41CH12f:A1345 I just need to extract the number that f...
asked by 19.01.2017 / 12:17
2
answers

Problem with accents in Regex

I am using the website link . Using the phrase as a regular expression: (?i)purificación And as a text PURIFICACIÓN To my surprise they do not machean, I thought that the case insensitive (i) modifier would solve this, but it does n...
asked by 10.08.2016 / 11:35
2
answers

Accept any character minus $% & | # with RegEx

I am something new in web programming and with Regular Expressions (RegEX) . How to allow my TextArea to accept any character except these $%&|<># ? I'm trying this with my TMForm.js . regula.custom({ name:'Special'...
asked by 10.01.2017 / 16:20
1
answer

filter with pattern range of ports

I would like to know how you can filter with pattern a range of ports such that only accept or numbers or numbers with two points in between and as long as it does not exceed 65535. Example: 20 or 20:25 The only thing that has occurred...
asked by 13.06.2016 / 09:50
2
answers

javascript replace regex

I need to make a replace in a whole string with a format similar to the following: var miRegExp = "^[0-9]+$"; var miString = $("input").val(); miString = miString.replace(new RegExp(miRegExp)+ /g, ''); The objective is to replace all the ch...
asked by 11.05.2018 / 17:15
3
answers

Compare the first character of the text

I have a code, that if a function is given as a parameter the string: #elemento You will use a document.getElementById(); and if you receive the string of the form: .elemento You will use a getElementsByClassName();...
asked by 05.10.2017 / 02:23
1
answer

Parse Geo URI in Java

I need to parse a URI of type geo. Samples: geo:79.786971,-124.399677 geo:42.374260,-71.120824?z=16 For the first sample I have the regular expression to filter that its structure is correct: ^geo:.(\-?\d+(\.\d+)?),\s...
asked by 15.11.2017 / 19:32