Questions tagged as 'regex'

2
answers

Class of characters denied as [^ +], without escaping the + sign

I have 2 patterns: var a = /[^+][a-zA-Z]/; var b = /[a-zA-Z][^+]/; According to sources that I have read, what the a does, is to deny with ^ the character + , but you should not escape it ?, staying: [^\+] In add...
asked by 13.11.2017 / 23:42
2
answers

How to make a Regex pattern in C # with the character '@'?

Good, I want to make a Pattern Regex to verify that in a chain there is the arroba character in the middle of two text strings in C #, the conventional: [email protected]. if (Regex.IsMatch(email, "\@{1,1}")) { //Codigo } In t...
asked by 28.09.2017 / 15:32
2
answers

Compare a text with a multidimensional array with regular expressions

I have sincerely tried with in_array , array_search and I could not do it. I have, for example, the following Array: $arg = array( "vimeo"=>array( "link" => '/https?:\/\/[w\.]*vimeo\.[^\/]*\/([^?]*)/is' ),...
asked by 15.01.2018 / 21:13
1
answer

How to eliminate forbidden words that may or may not be surrounded by brackets

I need to eliminate banned words from a text, and also remove brackets (brackets) if they had them before or after. This is the code I tried: window.addEventListener("load", function() { var palabrasProhibidas = ['mala','[mala]...
asked by 06.06.2017 / 00:09
3
answers

Regular Expressions in Python

I was trying to extract the information from an html code, in particular what interests me is to focus on the content of this html tag: <h2> <a href="https://www.xataka.com/robotica-e-ia/deepfakes-tendremos-problema-verdad-videos-serv...
asked by 01.11.2018 / 19:44
1
answer

Get the fourth number of numbers separated by; with regular expressions java

I'm trying to find the number that is in the fourth position of a string of numbers separated by semicolons The example string is as follows: 84;29.02964;28.87731;25.28935;0;-0.1523228;3.735915;27;27;349;27;27;413;27;27;371;26;26;373;26;26;...
asked by 03.07.2018 / 16:17
3
answers

Problem when validating DNI JavaScript [duplicated]

I am starting to learn JavaScript and I had a doubt when validating a DNI. The regular expression to check that it has 8 numbers and a letter of the alphabet does not work for me. //Se pide el número completo del DNI (12345678X) va...
asked by 13.10.2017 / 13:21
1
answer

Regular expressions as attributes

Are regular expressions still not well implemented in the browser? In which failure: codepen <form method="GET" name="formu" id="formu"> <p> <input type="text" name="nombre" pattern="[A-Za-z]" required> &l...
asked by 16.09.2017 / 02:32
2
answers

Remove all blank spaces at the beginning and end of a regular expression word

I need your help because I have a regular expression for all the blanks at the beginning and end of a word, but I have tried in several ways and I can not get the expected result, can you please guide me. Word 1:     4. numero de identi...
asked by 27.12.2018 / 23:46
1
answer

RegExp for URL

Good day! I have a regular expression to get only the part that interests me about a URL. I have 2 types of URL link link For now, I have achieved with this regexp ".*\/(.*\/.+)" get: page/login?execution=s3p1 The issue i...
asked by 04.12.2018 / 11:36