Questions tagged as 'regex'

2
answers

RegExp does not take the input value

I need to extract the value of a tag html <input value="2530317385" name="X-Tmx-session-id" id="X-Tmx-session-id" type="hidden"> I am using a Expressão Regular to return the value of input $pattern = '~<in...
asked by 22.04.2015 / 05:37
1
answer

Problems with PHP regular expressions?

I'm picking up a .txt file and removing the letters and lines in white. Tá giving problem with the special character \t or \s it does not recognize. The code below: <?php function pass1() { $treat = fopen ("C:\U...
asked by 13.02.2017 / 19:03
1
answer

Regex in Find () function in python

I need to use a regex in the Find() function in Python for example, if I use within a loop : arq = open("arquivo.txt","rb") var = arq.readline() a = var.find("abc.*def") It will be looking at the line "abc something (. *) de...
asked by 19.12.2016 / 19:19
1
answer

Mass Replacement in XML

Good morning! I have a program that checks some signals, but in the code it is only indicated which signal should appear, so I must apply the specific information that must be checked. But manually doing these overrides takes a lot of time so...
asked by 09.08.2016 / 16:08
1
answer

What exactly is the "u" modifier for?

What exactly does the u modifier in regular expressions from preg_ to PHP ? Should I use it whenever I process strings that have accented characters? $valor = 'ãẽi ouã'; preg_match('/\w+/u', $valor, $matches); $matches;...
asked by 23.07.2015 / 20:47
1
answer

Line break interferes with regular expression capture

I need to capture some information from divs that are sometimes separated by line breaks, and this causes the (.*) operator to not capture. For example, I have the regular expression: <div class="search tooltip box-video" search="...
asked by 17.01.2015 / 21:27
1
answer

Regular expression in delphi 7

I'm new to programming in Delphi 7, as well as regular expressions. Delphi 7 because in the company I'm working on, for other reasons, they have to use Delphi 7. I need to work with regular expressions, someone knows some way. From what I...
asked by 31.03.2015 / 03:10
2
answers

REGEX - Small details that do not match

I have this expression: (?:[ \t]*[a-z][)]\s*)?([^\r\n<]+(?:(?:\r?\n(?!\s*[a-z][)])|<(?!br\s*\/?>(?:\s*<br\s*\/?>)*\s*(?:\s+[a-z][)]|\s*$)))[^\r\n<]*)*)(?:<br\s*\/?>\s*)* What marry this text and remove the letters a)...
asked by 31.05.2018 / 16:57
1
answer

Regular expression formatted as internet domain

How to create a regular expression to validate an internet domain? The rules are below: Minimum length of 2 and a maximum of 26 characters; Valid characters are letters from "a" to "z", numbers from "0" to "9" and the hyphen; Do not only...
asked by 22.01.2016 / 20:19
2
answers

Regular expression to detect the credit card flag when there are specific characters in the number

I need to create a regular expression (Regex) that can identify the card number even when there are specific characters between the numbers, Example: Regex current: ((\d{16}|\d{4}(.\d{4}){3})|(\d{4}(\d{4}){3})) That allows me to re...
asked by 19.01.2016 / 18:15