Questions tagged as 'regex'

1
answer

Regex - Retrieving Preformatted File Property

The idea is to develop a tool that selects fields from a preformatted file according to a specific schema: Schema: 1. [Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris efficitur laoreet gravida. Nunc lacinia elit in nulla...
asked by 08.06.2017 / 22:13
1
answer

Search with REGEX in the VI

I have a regex that is valid as per the test link , but in the vi it does not work: 2017\/04\/26 12:24:(.*)(89418644) Here is an example that this REGEX should get married: INFO | 2017/04/26 12: 24: 15,019 | [OrderEntryAvailableOutgoing...
asked by 26.04.2017 / 17:42
1
answer

How to create a regex to remove rows with #?

I'm starting with regex now so I'm not very good yet with expressions, assuming I have the following variable: $foo = " #01 = linha comentada; 02 = valor para ser interpretado; #03 = outra linha comentada; ";...
asked by 28.04.2017 / 16:53
1
answer

How to get link from any anchor, using regular expression?

I use this code to capture links from a particular page: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIF...
asked by 19.01.2017 / 03:29
2
answers

Use of Uniq

I have been researching without much success, something that I believe in theory to be very simple, but I did not find the right command. I have a LOG file with several information, but certain information is repeated, but only in a certain c...
asked by 24.03.2017 / 23:27
1
answer

Doubt on Regular Expression

Good evening, everyone. I would like to know a regular expression to get the following information: Numbering and title of a chapter. Example: INTRODUCTION number = 1. title = INTRODUCTION 1.1. GENERAL OBJECTIVE number =...
asked by 25.01.2017 / 02:15
1
answer

Find and replace string

I have this json returned by a webservice: spConfig[92769] = new Product.Config({"attributes":{"152":{"id":"152","code":"color","label":"Cor","options":[{"id":"1777","label":"AZUL-INDIGO","price":"0","oldPrice":"0","products":["92781","92782",...
asked by 14.11.2016 / 13:04
4
answers

Get content between tags [x] and [/ x] with Regular Expression

My question is as follows, I have the following content that comes from a table in a database and I would like to use a regular expression or if you have something better, just separate the contents from within the brackets.    [pt-br]...
asked by 02.02.2017 / 00:21
1
answer

Escape from regex in php

local-config_form_settings- test To match the "test", I'm using this regex: (?<=config_form_settings-)([a-z0-9]+) I tested the regex here: link and it's the way I want it. In php I'm using preg_quote to escape from capture groups:...
asked by 26.09.2016 / 21:33
2
answers

Modify in xml in multiple files

Hello, I need to modify a value inside an xml node, the problem is that I need to do this in 1300 files at one time, the value I look for inside the node can be any one, it does not matter what value it is there, just need to modify this node...
asked by 05.09.2016 / 16:29