I have the following date / time format:
25/01 / 2017a1111: 53: 37
And the following regex:
REGX_DATAHORA_DISTRIBUICAO = "(?<data>\d{1,2}\/\d{1,2}\/\d{4})|(?<hora>\d{1,2}:\d{1,2}:\d{1,2})"
private OffsetDa...
I have an HTML that I need to retrieve the values from a set of <li> .
This is part of HTML:
<ul id="minhas-tags">
<li><em>Tagged: </em></li>
<li><a href="/tags/tag1">tag1</a>,...
I have the following input:
Detalhamento de Serviços nº: 999-99999-9999
I need to get the number in a group, for this I would use:
Detalhamento de Serviços nº: (\d+-\d+-\d+)
But I can not trust whether or not there is the string nº:...
I'm writing a regular expression for validating a password.
I wanted to know the easiest way to make a regular expression accept at least two of these conditions:
Uppercase letters
Lowercase letters
Special Characters
Numbers
A...
I need to write a program that identifies a lowercase letter surrounded by three uppercase letters on each side.
For example:
"AEIoSDE" == "o"
I wrote the code as follows:
# coding: utf-8
letra = raw_input()
for i in range(1, len(letr...
Hello, I need a help for a regular expression that satisfies some occurrences of a text file.
In this case, I need a regular expression that finds occurrences where there are a minimum number of characters in a pattern. For example:
I have...
I have the following values:
PRO|00000001|GASOLINA ADITIVADA|0101001|27101259|
I would like an expression that would change the values and look like this:
PRO|00000001|GASOLINA ADITIVADA|00000001|27101259|
I already have more or less a...
I'm with the code:
function addhttp($url){
if(!preg_match('~^(http)s?://~i', $url)){
$url = 'http://'.$url;
}
return $url;
}
It will add HTTP if the URL you entered does not contain it, but what I'm in doubt is the...
Good afternoon,
I have a notepad with several lines typed as for example:
★ Bayonet
★ Bayonet | Autotronic (Battle-Scarred)
★ Bayonet | Blue Steel (Minimal Wear)
★ Bayonet | Case Hardened (Battle-Scarred)
★ Bayonet | Case Hardened (Factory...
I would like to know how do I validate a field name, to accept:
Letters (Uppercase and Lowercase)
Numbers
Spaces
Maximum 30 characters
There can be no double space
There can be no space at the beginning and at the end...