onlinetexttools logo

Text from regex generator

World's simplest text tool

World's simplest browser-based utility for generating text from a regular expression. Enter your regexp in the options below and you'll instantly get text that matches it in the output area. Powerful, free, and fast. Load a regex – get text. Created by devs for devs.
i've redesigned my blog! catonmat
Super exciting news! I just redesigned my catonmat.net blog. Now it has a new minimalistic design and is entirely powered by alien technology. Check it out!
Regexp Pattern and Count
Use this regular expression to create text.
Number of text instances to create.
Text from regex generator tool What is a text from regex generator?
With this tool, you can create text from the given regular expression (regex). A regex is usually used to match or extract classes of characters from the text but here it is the other way around – text is constructed from the given pattern. A single regexp can match a very wide range of inputs, therefore we suggest you create multiple text instances at once. This can be done by setting instances number in the options. Every text instance will match your regex. Textabulous!
Text from regex generator examples Click to use
Favorite Movies
In this example, we use a regular expression to generate fake text that starts a dialogue with a friend and talks about favorite movies. We have entered several variants for the greeting text and movies so that the text was new and unique every time.
Greetings my mate. Have you seen my favorite movie - Mr. Nobody? I highly recommend it! Hello my pal. Have you seen my favorite film - Mr. Nobody? I highly recommend it! Hey my friend. Have you seen my favorite film - Hackers? I highly recommend it! Howdy my pal. Have you seen my favorite movie - The Matrix? I highly recommend it! Greetings my friend. Have you seen my favorite film - The Matrix? I highly recommend it!
Required options
These options will be used automatically if you select this example.
Use this regular expression to create text.
Number of text instances to create.
Generating Dates
In this example, we use a pattern that generates dates in the following format – "day month year". We use full month names and take into account the maximum number of days in each month.
30 June 1957 03 March 1994 09 September 2035 31 May 2083 02 August 1936 27 March 2075 30 August 2034 20 May 1994 12 November 1952 05 May 2079
Required options
These options will be used automatically if you select this example.
Use this regular expression to create text.
Number of text instances to create.
Written Numbers
This example creates four lines with a random set of spelled numbers in ascending order. This is done with the help of "?" regex operator that optionally produces output.
four five six eight nine one four eight ten three five eight nine one nine
Required options
These options will be used automatically if you select this example.
Use this regular expression to create text.
Number of text instances to create.
Phone Number
In this example, we generate a random list of phone numbers from a regex. It can create numbers in several different formats, such as +x(xxx)xxx-xxxx, x-xxx-xxx-xxxx, and +(xxx)xx-xxx-xx-xx.
+5(334)439-8893 +08(191)609-9940 +(954)85-901-39-46 +113(248)973-0172 +9(442)912-33-80 1-938-688-10-26
Required options
These options will be used automatically if you select this example.
Use this regular expression to create text.
Number of text instances to create.
Winner Announcements
This example creates 8 lines of text with winners announcements. The regular expression here randomly selects types of competitions and winners' names.
And the winner of the battle is Oliver! And the winner of the lottery is Linda! And the winner of the contest is William! And the winner of the game is Jessica! And the winner of the match is Jessica! And the winner of the fight is Emily! And the winner of the race is John! And the winner of the fight is Joseph!
Required options
These options will be used automatically if you select this example.
Use this regular expression to create text.
Number of text instances to create.
Strong Passwords
In this example, we generate five strong passwords from 12 to 30 characters in length that contain at least one number (?=.*[0-9]), at least one special character (?=.*[!@#$%^&*]), at least one lowercase letter (?=.*[az]) and at least one uppercase letter (?=.*[AZ]).
SX4%RqI8YstRIuQtJB3 1&mpuBvmtVznl mNHYeYct6jb#a$ VJxqx^7AYKcnfNTT!&kr Wk*C2q!JheUnj$C
Required options
These options will be used automatically if you select this example.
Use this regular expression to create text.
Number of text instances to create.
Pro tips Master online text 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://onlinetexttools.com/generate-text-from-regex?®ex=%28Hello%7CHey%7CHi%7CHowdy%7CGreetings%29%20my%20%28friend%7Cmate%7Cpal%7Cbuddy%29%5C.%20Have%20you%20seen%20my%20favorite%20%28movie%7Cfilm%29%20-%20%28The%20Fight%20Club%7CPirates%20of%20Caribbean%7CMr%5C.%20Nobody%7CThe%20Matrix%7CHackers%29%5C%3F%20I%20highly%20recommend%20it%21&results=5
All text tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly split text into chunks.
Quickly merge lines of text together.
Quickly repeat text many times.
Quickly write text backwards.
Quickly cut text to the given length.
Quickly trim left or right side of text.
Quickly pad the left side of text.
Quickly pad the right side of text.
Quickly align text to the right side.
Quickly center text.
Quickly prepend a prefix to text.
Quickly append a suffix to text.
Quickly delete all blank lines from text.
Quickly return text lines that match a string or a regex.
Quickly find and replace text patterns.
Quickly count the number of characters in text.
Quickly create an image from text.
Quickly construct a palindrome from plain text.
Quickly test if text is a palindrome.
Quickly convert text letters to uppercase.
Quickly convert text letters to lowercase.
Quickly randomize character case in text.
Quickly invert character case in text.
Quickly replace spaces with newlines in text.
Quickly replace newlines with spaces in text.
Quickly get tabs instead of spaces in text.
Quickly get spaces instead of tabs in text.
Quickly clear text from spaces, tabs, and newlines.
Quickly clear text from dots, commas, and similar characters.
Quickly extract tag content from HTML code.
Quickly extract tag content from an XML document.
Quickly extract all textual data from BBCode markup.
Quickly extract keys and values from a JSON data structure.
Quickly convert text to a JSON string.
Quickly convert previously JSON stringified text to plain text.
Quickly escape special symbols in text with slashes.
Quickly remove slashes from previously slash-escaped text.
Quickly encode or decode text using ROT13 cipher algorithm.
Quickly encode and decode text with ROT47 cipher algorithm.
Quickly create text that matches the given regexp.
Quickly find and return all regexp matches.
Quickly format text using the printf or sprintf function.
Quickly cyclically rotate text letters to the right or left.
Quickly rewrite text to vertical position.
Quickly format text so that all words are in neat columns.
Quickly convert data aligned in columns to linear text.
Quickly create a list of all monograms from text.
Quickly create a list of all digrams from text.
Quickly create a list of all ngrams from text.
Quickly write the text in Morse code.
Quickly decode Morse code to plain text.
Quickly URL-escape text.
Quickly URL-unescape text.
Quickly convert plain text to HTML entities.
Quickly convert HTML entities to plain text.
Quickly encode text to base64.
Quickly decode base64-encoded text.
Quickly convert plain text to binary text.
Quickly convert binary text to plain text.
Quickly convert plain text to octal text.
Quickly convert octal text to plain text.
Quickly convert text to decimal values.
Quickly convert decimal values to text.
Quickly convert plain text to hexadecimal values.
Quickly convert hexadecimal to readable text.
Coming soon These text tools are on the way
Calculate Levenstein Distance
Find Levenstein distance of two text fragments.
Tokenize Text
Create a list of all words in text.
Lemmatize Text
Lemmatize all words in text.
Generate Glitch Text
Let Zalgo mess up your text.
Generate Random Text
Generate text using random words.
Convert Text to Code Points
Convert text characters to their corresponding code points.
Convert Code Points to Text
Convert numeric character code points to text.
Convert CSV to Text Columns
Convert CSV data to plain text columns.
Convert Text Columns to CSV
Convert plain text columns to a CSV file.
Generate Text Trigrams
Create a list of all 3-grams.
Generate Text Skip-grams
Create a list of all n-skip-m-grams.
Stem Words in Text
Apply stemming to all words in text.
Convert Text to Title Case
Convert words in text to have title case.
Convert Text to Proper Case
Capitalize the first letter of every word in text.
Justify Text
Stretch spaces between words in text to make all lines equal length.
Format Text
Apply formatting and modification functions to text.
Find the Number of Letters in Text
Count the number of letters in text.
Find the Number of Words in Text
Count the number of words in text.
Find the Number of Lines in Text
Count the number of lines in text.
Fine the Number of Paragraphs in Text
Count the number of paragraphs in text.
Sort Letters in Text
Sort all characters in text alphabetically.
Sort Words in Text
Sort all words in text alphabetically.
Sort Sentences in Text
Sort all sentences in text alphabetically.
Sort Paragraphs in Text
Sort all paragraphs in text alphabetically.
Statistical Text Analysis
Analyze text for most frequent letters, words, phrases, sentences and paragraphs.
Add Text Line Numbers
Add a number before every line in text.
Wrap Text
Wrap words in text to a specified length.
Shuffle Letters in Text
Randomize the order of letters in text.
Shuffle Words in Text
Randomize the order of all words in text.
Shuffle Sentences in Text
Randomize the order of all sentences in text.
Shuffle Paragraphs in Text
Randomize the order of all paragraphs in text.
Find All Email Addresses in Text
Extract all emails from text.
Find All Web Addresses in Text
Extract all URLs from text.
Find All Numbers in Text
Extract all numbers from text.
Encode Text to Punycode
Convert text to punycode.
Decode Punycode to Text
Convert punycode to text.
Convert Text to Base32
Encode text to base32 encoding.
Convert Base32 to Text
Decode base32-encoded text.
Convert Text to Base58
Encode text to base58 encoding.
Convert Base58 to Text
Decode base58-encoded text.
Convert Text to Base85
Encode text to Ascii85 encoding.
Convert Base85 to Text
Decode Ascii85-encoded text.
UTF8-encode Text
Encode text to UTF8 encoding.
UTF8-decode Text
Decode UTF8-encoded text.
UTF16-encode Text
Encode text to UTF16 encoding.
UTF16-decode Text
Decode UTF8-encoded text.
UTF32-encode Text
Encode text to UTF32 encoding.
UTF32-decode Text
Decode UTF32-encoded text.
IDN-encode Text
Encode text to IDN.
IDN-decode Text
Decode IDN-encoded text.
Uuencode Text
Convert text to Unix-to-Unix encoding.
Uudecode Text
Decode Unix-to-Unix-encoded text.
Xxencode Text
Convert text to Xxencoding.
Xxdecode Text
Decode Xxencoded text.
Convert Text to Quoted Printable
Encode text to QP encoding.
Convert Quoted Printable to Text
Decode QP-encoded text.
Strip HTML Tags from Text
Remove all HTML tags from Text.
Strip XML Tags from Text
Remove all XML tags from Text.
Convert Text to HTML Entities
Encode all text characters to HTML entities.
Remove Diacritics from Text
Remove all accent marks from all characters in text.
Normalize Text Spacing
Remove duplicate spaces from text.
Compare Text
Find diff between two text fragments.
Create Text Typos
Generate various text typos.
Create a Mirror Copy of Text
Generate a mirror reflection of text.
Grep Text
Grep text for regular expression matches.
Head Text
Extract first lines from text.
Tail Text
Extract last lines from text
Rewrite Text
Rewrite text using transformation rules.
Generate Text Mnemonic
Return the first letter of each word in text.
Reverse Words in Text
Reverse every word in the given text.
Reverse Sentences in Text
Reverse every sentence in the given text.