onlinestringtools logo

String from regex generator

World's simplest string tool

Free online string from regex generator. Just load your regex and it will automatically generate strings that match it. There are no ads, popups or nonsense, just a string from regex generator. Load a regular expression, get a string. Created for developers by developers from team Browserling.
announcement a new project!
Super exciting news! We just launched MATHURLS – a fun math news reader. Check it out!
Regular Expression
Enter your regular expression here
Generator
How many strings to generate?
fullscreen fullscreen_exit
Printf Format
Printf format to apply on input strings.
fullscreen fullscreen_exit
String Left-Pad Options
Length of the string after left-padding.
Symbol to use for left-padding (space by default).
If checked, left-pads each line separately.
String from regex generator tool What is a string from regex generator?
This tool generates a bunch of strings for the given regular expression. It's basically a reverse regular expression operation. Magic!
String from regex generator examples Click to use
Generate Timestamps
This regex generates AM/PM timestamps. The regexp in the first parenthesis generates the first digit of the hour, which can be from 00 to 12. The second parenthesis generates minutes and seconds, which can be from 00 to 59. The third parenthesis generates the AM or PM symbol.
11:56:22 AM 01:42:07 AM 10:48:04 PM 10:17:44 AM 07:04:45 AM 05:26:20 PM 10:43:58 AM 05:01:49 AM 01:51:53 PM 10:27:36 PM
Required options
These options will be used automatically if you select this example.
Enter your regular expression here
Generate a Pronounceable English Word
This regular expression generates pronouncable English-looking words by making sure consonants follow vowels.
qes ejgo emj ypa ynhe ata uhiji zyxe save ydwat
Required options
These options will be used automatically if you select this example.
Enter your regular expression here
Generate Price Tags
This regexp generates US dollar price tags. It starts with the dollar symbol, followed by one to three digits, followed by up to nine digits more, followed by two optional cent digits.
$14,226,762,083 $796 $778.30 $988.34 $841 $93.59 $8,345.23 $5.37 $98 $8.09
Required options
These options will be used automatically if you select this example.
Enter your regular expression here
Generate SHA1 Hashes
This regular expression generates random SHA1 cryptographic hashes that match 40 character long hex strings. The alphabet used in SHA1 is the same as in SHA2 and MD5, which is letters a to f and digits 0 to 9.
b5f91a7b7fe3a81c4be6c55378b1da819f38667f 5eb66410163feeec36bc4b469cb872779016de7f 8217ef332406070defd85ba41c5d12e0944b49b8 653e02ac4eec01c98d7e6937a47ba1c1db12cab0 660d33c0febcf69bf4d20182f594cedf5d5841ed e19d9a59e75598f253f588f0de308e5cf6fc92ad 0f0e69dd9ba0fad1db66418279c74e3283d6464e 933429cdd4e4930ea1325d2e20be04cb8aa211e2 11a71265404c4bd4c0202dbd5ac8aa61af0bf5e6 3582d4c15906ad2c261aa9e66de2f6f925de519d
Required options
These options will be used automatically if you select this example.
Enter your regular expression here
Generate Random Gibberish
This regex generates random 40-character long garbage as it matches absolutely any and all strings of length of 40. This is achieved by entering ".{40}" as the regex, which is the same as "." repeated 40 times.
GaC1&';"nydi2D+qzXSy>:;t4Y4"MItRx5dzfl}Y 0I4~Y+F V$A!~z^S{S33ms@B}I+';93;}{cPS$?j UViWlD5WvK*y@OE{UrH#:F(u<e'l%4Fz..C^{KHK nTu&y85aK~;9%xM0F+mpr.lJ&({GJD4"ecY'yFVg nYjy]zv\>BS<l<_Dvz5?,l~ @xyz|[J|XVcW6KtT O4=;upS*G<cxaB"o[]e"QHc3-Vb/oKz&CaAm77I; 2S# rAgtg735 elt>D1~{sWUm8$&wMMY6RA8_~Rb &>>oLCt-y&;|DdE15c|TDE@ejE:&,2,KoH'^7InS xV9d5~w5x({Qo$z7LO&L1>ZL9/ >9U_sf=2wh;"" tu>5KWa{Ysj'U_!_|5$/s&d}1t<WuU:l q$xVM#o
Required options
These options will be used automatically if you select this example.
Enter your regular expression here
Pro tips Master online string tools
You can pass options to this tool using their codes as query arguments and it will automatically compute output. To get the code of an option, just hover over its icon. Here's how to type it in your browser's address bar. Click to try!
https://onlinestringtools.com/generate-string-from-regex?®ex=%281%5B0-2%5D%7C0%5B1-9%5D%29%28%3A%5B0-5%5D%5Cd%29%7B2%7D%20%28A%7CP%29M
All string tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly URL-escape a string.
Quickly URL-unescape a string.
Quickly convert a string to HTML entities.
Quickly convert HTML entities to a string.
Quickly convert a string to base64 encoding.
Quickly decode a base64-encoded string.
Quickly quote a string with backslashes.
Quickly un-quote a backslash-quoted string.
Quickly generate a random string.
Quickly generate a string from the given regular expression.
Quickly extract all regular expression matches from a string.
Quickly create an image from a string.
Quickly apply printf (or sprintf) on strings.
Quickly split a string into pieces.
Quickly join strings together.
Quickly filter lines that match a pattern in a multi-line string.
Quickly duplicate a string multiple times.
Quickly reverse a string.
Quickly find and replace parts of a string with a new string.
Quickly truncate a string to the given length.
Quickly left-trim and right-trim a string.
Quickly pad a string on the left.
Quickly pad a string on the right.
Quickly align a string to the right.
Quickly center a string.
Quickly sort a list of strings in alphabetical, alphanumerical or numerical order.
Quickly rotate a string to the left or to the right.
Quickly convert a string to ROT13.
Quickly convert a string to ROT47.
Quickly transpose a string.
Quickly add a prefix to a string.
Quickly add a suffix to a string.
Quickly convert spaces to newlines in a string.
Quickly convert newlines to spaces in a string.
Quickly convert spaces to tabs in a string.
Quickly convert tabs to spaces in a string.
Quickly remove empty lines from a string.
Quickly remove spaces, tabs, and newlines from a string.
Quickly remove dots, commas, and other marks from a string.
Quickly calculate a string's length.
Quickly calculate the number of newlines in a string.
Quickly convert a string to a binary string.
Quickly convert a binary string to a string.
Quickly convert a string to an octal string.
Quickly convert an octal string to a string.
Quickly convert a string to a decimal string.
Quickly convert a decimal string to a string.
Quickly convert a string to a hexadecimal string.
Quickly convert a hexadecimal string to a string.
Quickly convert a string to ASCII codes.
Quickly convert ASCII codes to a string.
Quickly convert a string to uppercase.
Quickly convert a string to lowercase.
Quickly randomize the case of each letter in a string.
Quickly invert string's case.
Quickly extract string data from a JSON data structure.
Quickly convert a string to a JSON string.
Quickly convert a JSON stringified string to a regular string.
Quickly extract all string data from a HTML page.
Quickly extract all string data from an XML document.
Quickly convert a CSV file to evenly aligned columns of space-separated strings.
Quickly convert strings to a proper CSV file.
Quickly extract all string data from a BBCode markup.
Quickly convert a string to Morse code.
Quickly convert Morse code to a string.
Quickly create a palindrome from a string.
Quickly check if a string is a palindrome.
Quickly generate all monograms of a string.
Quickly generate all digrams of a string.
Coming soon These string tools are on the way
Replace Multiple Strings
Replace a set of strings with a new set.
Title-case a String
Convert a string to a title with proper titlecase.
Capitalize Words in a String
Convert the first letter of every word in a string to uppercase.
Justify a String
Stretch out a string and Align it along the left and right margins.
Format a Multi-line String
Format and align a multi-line string.
Number of Letters in a String
Find how many letters there are in a string.
Number of Words in a String
Find how many words there are in a string.
Number of Lines in a String
Find how many lines there are in a multi-line string.
Number of Paragraphs in a String
Find how many paragraphs there are in a multi-line string.
Sort Words in a String
Sort all words in a string alphabetically.
Sort a Numeric String
Sort a string that contains only numbers.
Reverse Words in a String
Reverse the order of all words in a string.
Reverse Sentences in a String
Reverse the order of all sentences in a string.
String Frequency Analysis
Find most frequent letters, words and phrases in a string.
Create String Mnemonic
Generate a mnemonic for words in a string.
Number a Multi-line String
Add line numbers to a multi-line string.
Wrap a String
Wrap strings to the given line length.
Chunkify a String
Split a string into chunks of certain length.
Shuffle Words in a String
Shuffle the order of all words in a string.
Extract Emails from a String
Find and extract all email addresses from a string.
Extract URLs from a String
Find and extract all web addresses from a string.
Extract Numbers from a String
Find and extract all numbers from a string.
Generate String Statistics
Analyze string's complexity.
Convert a String to Punycode
Encode a string to punycode.
Convert Punycode to a String
Decode a string from punycode.
QP-encode a String
Convert a string to quoted-printable encoding.
QP-decode a String
Convert quoted-printable encoded data to a string.
Base32-encode a String
Encode a string to base32.
Base32-decode a String
Decode a string from base32.
Base58-encode a String
Encode a string to base58.
Base58-decode a String
Decode a string from base58.
Base85-encode a String
Encode a string to Ascii85.
Base85-decode a String
Decode a string from Ascii85.
UTF8-encode a String
Encode a string to UTF8.
UTF8-decode a String
Decode a string from UTF8.
UTF16-encode a String
Encode a string to UTF16.
UTF16-decode a String
Decode a string from UTF16.
UTF32-encode a String
Encode a string to UTF32.
UTF32-decode a String
Decode a string from UTF32.
IDN-encode a String
Encode a string to IDN.
IDN-decode a String
Decode a string from IDN encoding.
Uuencode a String
Convert a string to Unix-to-Unix encoding.
Uudecode a String
Convert Unix-to-Unix data to a string.
Xxencode a String
Convert a string to Xxencoding.
Xxdecode a String
Convert an Xxencoded string to a regular string.
HTML-strip a String
Strip all HTML tags from a string.
Remove Accent Characters
Remove all diacritical signs from a string.
Remove Duplicate Spaces
Normalize string spacing and remove all duplicate spaces.
Diff Two Strings
Visualy compare and find differences between two strings.
String Levenshtein Distance
Calculate Levenshtein distance between two strings.
Rewrite a String
A tiny string rewriting system.
Generate a Zalgo String
Convert a string to Unicode mess.
Generate String Typos
Create a list of all possible string typos.
Mirror a String
Generate a mirror copy of a string.
Generate Trigrams
Generate all 3-grams of a string.
Generate all N-grams
Generate all ngrams of a string.
Generate N-skip-M-grams
Generate n-skip-m-grams of a string.
Tokenize a String
Create a list of tokens from a string.
Lemmatize a String
Lemmatize all words in a string.
Stem a String
Do stemming of all words in a string.
Grep a String
Extract fragments that match a regular expression in a string.
Head a String
Split a string into fragments and extract the beginning parts.
Tail a String
Split a string into fragments and extract the ending parts.
Convert a String to an Array
Create an array of characters from a string.
Convert a String to Integers
Split a string into characters and return their integer values.