Questions tagged as 'regex'

1
answer

Regular Expression

I have an application that reads a string and needs to detect parameters contained in the string. The parameter has the following pattern <<<.texto>>> ( < and > are part of the parameter). I was ab...
asked by 12.11.2015 / 19:32
1
answer

Regular expression to validate text

I'm doing a method that will import some data, and before importing I need to check if some fields are correctly filled in, the fields should come this way: Example: Jan/Seg Fev/Ter Mar/Qui The data must be in this exact format, where th...
asked by 21.11.2018 / 13:33
1
answer

Find all occurrences of a pattern in a String

I need to use regular expressions to find patterns in a text. It would be better for me if there were a method equal to search() of Python, which returns a vector with all occurrences of that pattern. Is there a similar method in Java?  ...
asked by 19.02.2018 / 21:45
1
answer

Using preg_match

With this code I can block special characters in my input , however I want it to still accept . , - and _ how to proceed? elseif (!preg_match('/^[a-z A-Z0-9]+$/', $username)) { echo json_encode(array( 'log...
asked by 06.12.2017 / 17:24
1
answer

Input read more than one line of the string

I'm having a problem, my code needs to read a string that contains more than one line, however, it reads the first and to, as if when the line is skipped, it interpreted as an "enter." > def depositlist(): deplist = str(input('''Entre com a lis...
asked by 15.12.2017 / 04:39
2
answers

Find and remove words from multiple arrays

I have some arrays that come from the database, and I would like to remove occurrences of words in them, for example, the string in $title $title = "Eles foram com José procurar alguma coisa"; $bad_words = array('foram','prOcuRar','......
asked by 11.06.2017 / 01:27
1
answer

REGEX - problem with validation

I need to do the following validation:    apostrophe , hyphen , hyphen () and numbers (0-9) For this I did the following: import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexTest { /** validação *...
asked by 08.08.2017 / 23:13
1
answer

How to create groups in regex to validate password criteria in Elixir?

I need to validate the criteria in a password: Must contain at least one uppercase letter. At least one lowercase At least one number Size must be between 6 and 32 characters Can not have any special characters or spaces Must have...
asked by 22.07.2017 / 12:29
1
answer

Regular expression for Java (validating password)

I need a regular expression to validate the following password: The password must contain at least one element of each : More than 6 characters; Uppercase and lowercase letters; Numbers; Special characters. Currently, I have thi...
asked by 30.09.2017 / 20:33
1
answer

Regex for capturing fixed strings in HTML and JS codes [closed]

I am doing some automated testing for a legacy project in the MVC template, however there is a requirement for one of them that is capturing all fixed strings in HTML and JS codes. Since the project company is undergoing an internationalizatio...
asked by 11.05.2017 / 17:37