Questions tagged as 'regex'

1
answer

Search for string part in mongo by php?

How to: db.getCollection('Collection').find({“field”: /.*A.*/}) Using PHP MongoDB \ BSON \ Regex?     
asked by 04.05.2018 / 18:41
2
answers

Regular expression for URLs with dynamic media

I have an html file with urls in this default URL: https://www.olympikus.com.br/tenis-olympikus-flower-415-feminino-cinza-D22-1131-010 The default is protocolo://dominio/strig-dinâmica-000-0000-000 I want to get all the links in...
asked by 28.04.2018 / 23:42
1
answer

How can I do this in a smarter way without conflict?

In this way, you are returning some errors and it looks like you may experience conflicts in cases of 2-character operators. Example: "++" being replaced by "# ++ #" while on the next call of replaceAll() it will replace the operands f...
asked by 12.04.2018 / 07:51
1
answer

Copy code snippet, modify and paste into another Div

I am designing an experimental system where when clicking a button it copies what is selected (in this case an excerpt in html) like the one below: <section> <h1> titulo </h1> <p>texto desta área</p> &l...
asked by 18.04.2018 / 12:55
1
answer

How to create a CONSTRAINT CHECK in SQLServer to validate versions with RegEx

Hello, I am creating a table in SQLServer where I want to validate a field to only accept the correct version mask, like this: CREATE TABLE Versao ( id INT NOT NULL IDENTITY(1,1), codigo NVARCHAR(100) NOT NULL, CONSTRAINT [PK_Vers...
asked by 18.04.2018 / 14:28
4
answers

Decrease field value span with preg_replace

I'm trying to change all the values of fields containing span class . Example the site looks like this: <div id="isOffered"> <a class="price addBetButton footballBetButton" id="bk_82285689_mk_sel1" href=""> <span...
asked by 23.02.2015 / 01:56
1
answer

Regex to match the first occurrence before a word

My string is as follows: \questao{1} \begin{enumerate} todos os tipos de caracteres \end{enumerate} \begin{enumerate} -------> APENAS este deve dar match todos os tipos de caracteres \end{enumerate} \questao{2} I'm trying to mak...
asked by 30.03.2018 / 15:49
0
answers

Regex to search for words

How to create a REGEX to search for a word in a string taking into account words with accents and / or uppercase and lowercase. A search similar to Ctrl + f     
asked by 16.02.2018 / 14:46
1
answer

Regex Phone Validation [duplicate]

I'm currently using a regular expression to validate phones in the following format:    (xx) xxxxx-xxxx It accepts only numbers that have this exact format. I would like to know how to modify the expression to accept numbers with either...
asked by 22.02.2018 / 14:54
0
answers

Regular Expression in PHP (Remove a specific TAG among other TAGs)

I need to learn how to remove TAG '</div>' between% TAGs with% PHP. Reinforcing, only in this condition that TAG '</blockquote> </div> </figure>' should be removed. How should I proceed? Thanks     
asked by 08.02.2018 / 14:41