instruction stringclasses 1
value | input stringlengths 9 1.68k | output stringlengths 1 453 |
|---|---|---|
Write the regular expression for the following requirement: | Matching a Username that can contain any character but must be 3 to 16 characters long | ^[a-zA-Z0-9_-]{3,16}$ |
Write the regular expression for the following requirement: | Match a password that needs to have at least one digit, at least one small letter, at least one capital letter, at least one special character, and have a length between 8 and 18 characters. | ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$^&*()_-]).{8,18}$ |
Write the regular expression for the following requirement: | Match a hex value | /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i |
Write the regular expression for the following requirement: | Match groups of characters separated by a hyphen | /^[a-z0-9-]+$/ |
Write the regular expression for the following requirement: | match an email | /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,63})$/ |
Write the regular expression for the following requirement: | Match a url | /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/ |
Write the regular expression for the following requirement: | Match an IP address | /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ |
Write the regular expression for the following requirement: | Match an HTML tag | /^<([a-z\d]+)([^<]+)*(?:>(.*)<\/\1>|\s*\/>)$/ |
Write the regular expression for the following requirement: | Match dates that follow the format "DD/MM/YYYY ", "DD-MM-YYYY", or "DD.MM.YYYY" | /^([1-2][0-9]|3[0-1]|0?[1-9])([-\.\/ ])(1[0-2]|0?[1-9])(\2)([\d]{4}|[\d]{2})$/ |
Write the regular expression for the following requirement: | match french phone numbers that include the country code but do not have delimiters. | \b([0O]?[1lI][1lI])?[3E][3E][0O]?[\dOIlZEASB]{9}\b |
Write the regular expression for the following requirement: | match Germain phone numbers | \b[\d\w]\d{2}[\d\w]{6}\d[\d\w]\b |
Write the regular expression for the following requirement: | Match UK phone numbers that include country code but does not have delimiters. | \b([0O]?[1lI][1lI])?[4A][4A][\dOIlZEASB]{10,11}\b |
Write the regular expression for the following requirement: | match US phone numbers | \b((\+|\b)[1l][\-\. ])?\(?\b[\dOlZSB]{3,5}([\-\. ]|\) ?)[\dOlZSB]{3}[\-\. ][\dOlZSB]{4}\b |
Write the regular expression for the following requirement: | Match US street addresses | \b\d{1,8}\b[\s\S]{10,100}?\b(AK|AL|AR|AZ|CA|CO|CT|DC|DE|FL|GA|HI|IA|ID|
IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MS|MT|NC|ND|NE|NH|NJ|NM|NV|NY|OH|
OK|OR|PA|RI|SC|SD|TN|TX|UT|VA|VT|WA|WI|WV|WY)\b\s\d{5}\b |
Write the regular expression for the following requirement: | match dates. | \b([0-3]?\d(st)?(th)?|jan|feb|mar|apr|may|jun|jul| aug|sep|oct|nov|dec)[/\- ]([0-3]?\d(st)?(th)?|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[/\- ]\d{2,4}\b |
Write the regular expression for the following requirement: | match and redact full email addresses. | \b[a-z0-9._%\+\---|]+@[a-z0-9.\---|]+\.[a-z|]{2,6}\b |
Write the regular expression for the following requirement: | uses contextual hints to locate and redact dates that are in proximity to words that typically denote birth dates. It's important to understand that while dates are regular patterns, birth dates are not.
If a non-birth date exists within close proximity of our contextual hits, it will be redacted. The contextual hint ... | \b(birth|birthdate|birthday|dob|born)\W+(?:\w+\W+){0,5}?(?<REDACT>(\d{4}|\d{1,2})[\/\-]\d{1,2}[\/\-](\d{4}|\d{1,2}))\b |
Write the regular expression for the following requirement: | This regular expression will match and general IPv4 addresses. | \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b |
Write the regular expression for the following requirement: | This regular expression will match and general IPv6 addresses. | \b([\d\w]{4}|0)(\:([\d\w]{4}|0)){7}\b |
Write the regular expression for the following requirement: | matches the following samples.
Visa
4532613257548007
4716563756075937
4929038415234561233
4718 4123 4142 4124
4716-5637-5607-5937
MasterCard
2720-9928-3988-7281
2720992839887281
5461718001676921
5489790994470834
5489 7909 9447 0834
5489-7909-9447-0834
American Express
372714876128394
346781676352683
37... | \b((4\d{3}|5[1-5]\d{2}|2\d{3}|3[47]\d{1,2})[\s\-]?\d{4,6}[\s\-]?\d{4,6}?([\s\-]\d{3,4})?(\d{3})?)\b |
Write the regular expression for the following requirement: | This regular expression matches the following ABA routing numbers:
011103093
Florida 067014822
Maine 211274450
Massachusetts/Rhode Island 211370545
Metro DC/Maryland/Virginia 054001725
New Hampshire 011400071
New Jersey/Delaware 031201360
New York - Metro NYC or former Commerce customers 026013673
New York - U... | \b((0[0-9])|(1[0-2])|(2[1-9])|(3[0-2])|(6[1-9])|(7[0-2])|80)([0-9]{7})\b |
Write the regular expression for the following requirement: | This regular expression can be used to apply markups to an ABA routing number. | \b(0[0-9]|1[0-2]|2[1-9]|3[0-2]|6[1-9]|7[0-2]|80)\d{7}\b |
Write the regular expression for the following requirement: | This regular expression can be used to redact SWIFT codes for payment instruction information. | \b[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?\b |
Write the regular expression for the following requirement: | This regular expression can be used to redact IBAN codes for payment instruction information. | (?:(?:IT|SM)\d{2}[\w]\d{22}|CY\d{2}[\w]\d{23}|NL\d{2}[\w]{4}\d{10}|LV\d{2}[\w]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[\w]{4}\d{14}|GI\d{2}[\w]{4}\d{15}|RO\d{2}[\w]{4}\d{16}|KW\d{2}[\w]{4}\d{22}|MT\d{2}[\w]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}... |
Write the regular expression for the following requirement: | This regular expression matches the following examples:
34.960.099
63.889.141
40.571.278
45.855.200
80.933.831 | \d{2}\.\d{3}\.\d{3} |
Write the regular expression for the following requirement: | This regular expression will match Canadian passport IDs. | \b[\w]{2}[\d]{6}\b |
Write the regular expression for the following requirement: | This regular expression will match Canadian postal codes. | \b[a-z]\d[a-z][ -]?\d[a-z]\d\b |
Write the regular expression for the following requirement: | This regular expression will match Canadian insurance numbers. | \b(\d{3}[\--\-_]\d{3}[\--\-_]\d{3})|(\d{9})\b |
Write the regular expression for the following requirement: | This regular expression will match Croatian VAT ID card number. | \bHR\d{11}\b |
Write the regular expression for the following requirement: | This regular expression will match Czech Republic VAT ID card number. | \bCZ\d{8,10}\b |
Write the regular expression for the following requirement: | This regular expression will match Denmark Personal ID number. | \b\d{10}|\d{6}[-\s]\d{4}\b |
Write the regular expression for the following requirement: | This regular expression will match France's National ID card (CNI). | \b\b\d{12}\b\b |
Write the regular expression for the following requirement: | This regular expression will match France's Social Security Number (INSEE). | \b\d{13}|\d{13}\s\d{2}\b |
Write the regular expression for the following requirement: | This regular expression will match France's Driver's license ID. | \b\d{12}\b |
Write the regular expression for the following requirement: | This regular expression will match France's Passport ID. | \b\d{2}11\d{5}\b |
Write the regular expression for the following requirement: | This regular expression will match Germany's ID card number. | \bl\d{8}\b |
Write the regular expression for the following requirement: | This regular expression will match Germany's Passport ID. | \b[cfghjk]\d{3}\w{5}\d\b |
Write the regular expression for the following requirement: | This regular expression will match Germany's Driver's License ID. | \b[\d\w]\d{2}[\d\w]{6}\d[\d\w]\b |
Write the regular expression for the following requirement: | This regular expression will match Personal Public Service (PPS) Number. | \b\d{7}\w{1,2}\b |
Write the regular expression for the following requirement: | This regular expression will match Citizen's Service (BSN) number. | \b\d{8}|\d{3}[-\.\s]\d{3}[-\.\s]\d{3}\b |
Write the regular expression for the following requirement: | This regular expression will match Poland's National ID (PESEL). | \b\d{11}\b |
Write the regular expression for the following requirement: | This regular expression will match Portugal's Citizen Card Number. | \d{9}[\w\d]{2}|\d{8}-\d[\d\w]{2}\d |
Write the regular expression for the following requirement: | This regular expression will match Sweden's Passport ID. | \b\d{8}\b |
Write the regular expression for the following requirement: | This regular expression will match Spain's Social Security Number. | \b\d{2}\/?\d{8}\/?\d{2}\b |
Write the regular expression for the following requirement: | This regular expression will match United Kingdom's Passport ID. | \b\d{9}\b |
Write the regular expression for the following requirement: | This regular expression will match United Kingdom's Driver's License ID. | \b[\w9]{5}\d{6}[\w9]{2}\d{5}\b |
Write the regular expression for the following requirement: | This regular expression will match United Kingdom's National Health Service (NHS) number. | \b\d{3}\s\d{3}\s\d{4}\b |
Write the regular expression for the following requirement: | These regular expressions are optimized for image and spreadsheet documents respectively. The image version of the SSN Regex is specifically created to be defensive against common OCR mistakes such as 1 being read as l, i, or I. | \b[\dlZEASBO]{3} [\dlZEASBO]{2} [\dlZEASBO]{4}|([\dlZEASBO] ?){3}[\--\-_] ?([\dlZEASBO] ?){2}[\--\-_] ?([\dlZEASBO] ?){4}\b |
Write the regular expression for the following requirement: | These regular expressions are optimized for image and spreadsheet documents respectively. The image version of the SSN Regex is specifically created to be defensive against common OCR mistakes such as 1 being read as l, i, or I. | \b[\d]{3} [\d]{2} [\d]{4}|([\d] ?){3}[\--\-_] ?([\d] ?){2}[\--\-_] ?([\d] ?){4}\b |
Write the regular expression for the following requirement: | This regular expression will match the Federal Employer ID number. | \b[0-9]{2}[--\-][0-9]{7}\b |
Write the regular expression for the following requirement: | Email validation : | ^[^@ ]+@[^@ ]+\.[^@ \.]{2,}$ |
Write the regular expression for the following requirement: | Password validation: | (?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s)(?=.*[!@#$*]) |
Write the regular expression for the following requirement: | Valid date format: | \d{4}-\d{2}-\d{2} |
Write the regular expression for the following requirement: | Empty string validation: | ^\s*$ |
Write the regular expression for the following requirement: | Phone number validation: | ^[\\(]\d{3}[\\)]\s\d{3}-\d{4}$ |
Write the regular expression for the following requirement: | Visa Credit card number Validation: | ^4[0-9]{12}(?:[0-9]{3})?$ |
Write the regular expression for the following requirement: | American Express Credit card number Validation: | ^3[47][0-9]{13}$ |
Write the regular expression for the following requirement: | Mastercard Credit card number validation: | ^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$ |
Write the regular expression for the following requirement: | Discover Credit card number validation: | ^6(?:011|5[0-9]{2})[0-9]{12}$ |
Write the regular expression for the following requirement: | matches dog and dig | d[oi]g |
Write the regular expression for the following requirement: | Matches dag, dug, d1g
Does not match dog and dig | d[^oi]g |
Write the regular expression for the following requirement: | Any single digit from 0 to 9 | [0-9] |
Write the regular expression for the following requirement: | Any single lowercase letter | [a-z] |
Write the regular expression for the following requirement: | Any single uppercase letter | [A-Z] |
Write the regular expression for the following requirement: | matches 1, 1a, 1aa, 1aaa, etc. | 1a* |
Write the regular expression for the following requirement: | In pot, matches po
In poor, matches poo | po+ |
Write the regular expression for the following requirement: | matches road, rod | roa?d |
Write the regular expression for the following requirement: | In 1a, 1aa and 1aaa, matches 1a | 1a*? |
Write the regular expression for the following requirement: | In pot and poor, matches po | po+? |
Write the regular expression for the following requirement: | In road and rod, matches ro | roa?? |
Write the regular expression for the following requirement: | Exactly 3 digits | \d{3} |
Write the regular expression for the following requirement: | 3 or more digits | \d{3,} |
Write the regular expression for the following requirement: | From 3 to 5 digits | \d{3,5} |
Write the regular expression for the following requirement: | In 5 cats and 10 dogs, captures 5 (group 1) and 10 (group 2) | (\d+) |
Write the regular expression for the following requirement: | In 5 cats and 10 dogs, captures 10 | (\d+)(?: dogs) |
Write the regular expression for the following requirement: | Matches 5+10=10+5 and captures 5 and 10, which are in capturing groups | (\d+)\+(\d+)=\2\+\1 |
Write the regular expression for the following requirement: | Any number of digits at the start of the string.
In 5 cats and 10 dogs, matches 5 | ^\d+ |
Write the regular expression for the following requirement: | Any number of digits at the end of the string.
In 10 plus 5 gives 15, matches 15 | \d+$ |
Write the regular expression for the following requirement: | Matches joy as a separate word, but not in enjoyable. | \bjoy\b |
Write the regular expression for the following requirement: | Matches joy in enjoyable, but not as a separate word. | \Bjoy\B |
Write the regular expression for the following requirement: | In she sells sea-shells, matches sells and shells | (s|sh)ells |
Write the regular expression for the following requirement: | contains {color, colour} | colou?r |
Write the regular expression for the following requirement: | contains Hello followed by a newline followed by world | Hello\nworld |
Write the regular expression for the following requirement: | begins with "dog" | ^dog |
Write the regular expression for the following requirement: | ends with "dog" | dog$ |
Write the regular expression for the following requirement: | is exactly "dog" | ^dog$ |
Write the regular expression for the following requirement: | Matches aaa regex at the beginning of the line | ^aaa |
Write the regular expression for the following requirement: | Matches regex aaa at the end of the line | aaa$ |
Write the regular expression for the following requirement: | Can match any of the letter a, b or c. [] are known as character classes. | [abc] |
Write the regular expression for the following requirement: | Can match a, b or c followed by 1 or 2 | [abc][12] |
Write the regular expression for the following requirement: | When ^ is the first character in [], it negates the pattern, matches anything except a, b or c | [^abc] |
Write the regular expression for the following requirement: | Matches ranges between a to e or 1 to 8 | [a-e1-8] |
Write the regular expression for the following requirement: | x occurs once or not at all | x? |
Write the regular expression for the following requirement: | X occurs zero or more times | X* |
Write the regular expression for the following requirement: | X occurs one or more times | X+ |
Write the regular expression for the following requirement: | X occurs at least n times but not more than m times | X{n,m} |
Write the regular expression for the following requirement: | lines which do not contain the letter 'e'. | ~(.*e.*) |
Write the regular expression for the following requirement: | lines that contain only the letters 'agde'. | agde |
Write the regular expression for the following requirement: | lines using words ending in 'er'. | .*\b[A-Za-z]*er\b.* |
Write the regular expression for the following requirement: | lines which contain only lowercase letters. | [a-z]* |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.