Questions tagged as 'regex'

1
answer

Simulate _GET php in string

I have a string to simulate: <li><a title="string" href="http://geting.com/?v=123?t=abc">Opção 1</a></li> I would like something that takes the parameter ?v= , just it, same as when we get the method $_GET["...
asked by 26.11.2018 / 20:54
1
answer

Redirect all media requests (css, js and images) with htaccess

I am building an MVC application and I was having some problems with the path of the css, js and images files in the html ... I was given a solution to use the <base> tag to set the path that all html files would follow, ex: &l...
asked by 25.12.2015 / 04:22
2
answers

Reduce Fatty Expression

I have the following expression: /((segunda|terça|quarta|quinta|sexta|sábado|domingo)+(((-feira)?)+(.)+\(([0-9].*)\))?)/im In which you bring me    Show Barter performs this Saturday at CDL Theater RESULTADO: sábado    Rock bands p...
asked by 18.07.2014 / 03:45
2
answers

Regex to extract content from string

Good evening guys, Thank you for visiting and suggesting to help me. I am very bad at regex so I come to ask for your help. I have the following string which can also vary by example: string(49) "02/12/2018 (Assessment 2) = /86= | Weight...
asked by 26.11.2018 / 00:10
3
answers

Regular expression to find word exception

I'm looking for a particular recursive function which I can not remember the name of. For this I set up the following ER: function (\w+)\([\x00-\xFF]+\( You will necessarily search for all functions that call their name (recursive). I am aw...
asked by 12.11.2014 / 14:56
1
answer

How to find a string based on a group of regular expressions

I'm trying to create a Template Engine in PHP for study reasons. Suppose I have the following array : $regexList = [ 'varPattern' => '/{{\s*\$(.*?)\s*}}/', 'loopPattern' => '/@for\((.*?)\)\s*{{((?:[^{}]|(?R))*)}}/', 'statemen...
asked by 24.05.2017 / 14:09
1
answer

Validate google api key

I'm making an application, where I'll have to validate a google maps API key. The problem is that I do not know what patterns it follows: AIzaSyA-OlPHUh2W7LUZXVjQjjxQ8fdCWdAASmc Here you can see that they are uppercase and lowercase, numbe...
asked by 20.07.2016 / 15:09
1
answer

Asp.Net 5 (Core 1.0) Class Library System.Text.RegularExpression

How to use the System.Text.RegularExpression namespace in Asp.Net 5, I'm having a project and I was upgrading it to ASP.NET 5, my problem was that I can not use regular expressions in the same en as I can reference the namespace in issue.     
asked by 05.03.2016 / 15:54
1
answer

JQuery masked input with regex?

I put the following script to put only month and year in the input, and set the regex to accept typing from 1 to 12 for months: $.mask.definitions['X'] = "^([0-1]|1[0-2])$"; jQuery(function($){ $("#masked...
asked by 04.11.2015 / 17:07
1
answer

Regular expression in pattern

I have an input of type text that I am validating with regular expression, the rule of expression is as follows: it starts with a number between 0 and 2 and then 6 more random numbers, but I do not know why it does not work. <input pattern=...
asked by 31.12.2015 / 14:02