string contains

Published on Tue Mar 01 2022

Additional matching regexes for
string contains

Match at least One upper, lower, number and Special char.

Determines if string contains: 1 Uppercase 1 Lowercase 1 Number 1 Symbol


get special tag contains html link

Module Name

Starts with Alphabet but may contains numbers and underscore _

domain for Google Data Studio (re2 dialect)

Matches subdomain, domain and top level in a field that contains a urls. --->

french phone number + match right part

Matches french numbers (not special numbers like 115, 18). First matching group contains the right part without prefix (0, +33, 33, 033, or 0033).

Duration with mandatory 'm'

Parses date-time duration strings [+-][P]1y2M3d4h5m6s, where 'm' is the dafault. Like this, where {} contains list of capturing groups: 21 - parsed as {,,,,21,} 2y2s - parsed as {2,,,,,2}


trim string

Alien username

Input Format The first line contains a single integer, , denoting the number of usernames. Each line of the subsequent lines contains a string denoting an alien username to validate. Constraints Output Format Iterate through each of the strings in order and determine whether or not each string is a valid alien username. If a username is a valid alien username, print VALID on a new line; otherwise, print INVALID. Sample Input 3 _0898989811abced_ _abce _09090909abcD0 Sample Output VALID INVALID INVALID Explanation We validate the following three usernames: _0898989811abced_ is valid as it satisfies the requirements specified above. Thus, we print VALID. _abce is invalid as the beginning _ is not followed by one or more digits. Thus, we print INVALID. _09090909abcD0 is invalid as the sequence of English alphabetic letters is immediately followed by a number. Thus, we print INVALID.

String Interpolation

String Interpolation. Works Like Angular


get pack_size from a string