Questions tagged as 'regex'

1
answer

Help with Regex in VB.Net

I'm trying to set up an expression to run in VB.Net that finds in the contents of a file the text GO . The text is always on a new line and may or may not contain spaces or tabs. I got the expression GO|\t\s\n but it identifies the...
asked by 09.06.2017 / 21:18
1
answer

Problem picking string type with Router AltoRouter

I'm using AltoRouter to make the page call of my project, and in the doc it says that to use "Custom Match Types" just add $router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?')); However, I tried using this ru...
asked by 16.12.2016 / 04:45
1
answer

Collecting links in a text file

I have a problem in my program where I have to get links throughout the text file. I used regex to collect the links, however, only a few lines are captured (the file has approximately 3500 rows) and some links. Note: The text file is from Whats...
asked by 14.11.2016 / 16:48
1
answer

Error with Php and Preg_Match

I have the following line in a php file if(preg_match("!\oa!", $id)){ Until about 2 months ago this worked normally but started to give this error    Warning: preg_match () [function.preg-match]: Compilation failed:   missing opening bra...
asked by 15.10.2016 / 01:34
1
answer

Separate items from a string using Regex

I need to separate the items from a string into an array using C # and Regex, could they help me? The string is as follows: required|email|min:2|max:255 There are some rules I wanted to fit: Separate the main items delimited by...
asked by 15.06.2016 / 21:51
1
answer

Regular expression of monetary value

Hello, I have the following function function CarregarMascaras() { $('[data-mascara=numeroMonetario]').keyup(function () { this.value = this.value.replace(/[^0-9]+[^\,]?[^0-9]+/g, ''); }).on('paste', function () { this.value =...
asked by 25.07.2016 / 22:26
1
answer

Regex to add a hierarchy level in all CSS rules

I do not know much about regex (I do not think anyone fully understands this) and I would like to do a regular expression to change a CSS file by putting a hierarchy level (a class called "myClass" for example) in all rules, following way: Cu...
asked by 27.05.2016 / 21:33
1
answer

How to include a regex in the parameters of an Express route?

In a project I'm doing I want to point a specific route to a controller. In a simple case of a route with parameters I would do so: app.get('/:lang/:activities/:activity', require('./routes/activities')); But in this specific case the ac...
asked by 28.05.2016 / 16:19
1
answer

REGEXP Regular Expression in Mysql

I have the following problem: I need to make a query (The site was developed in wordpress) where I have several health specialties. When an item is marked with two categories it is registered as follows in the database: ["1", "19"] , I...
asked by 07.01.2016 / 19:48
1
answer

Return CSS file classes using Regex and PHP

I have the following CSS: .icon-a{ background:black; color:white; } .icon-b{ backgroundwhite; color:black; } .icon-c{ background:blue; color:yellow; } I wanted a PHP script that could read the CSS file and re...
asked by 09.11.2015 / 14:58