onlinetexttools logo

Regex matches extractor

World's simplest text tool

World's simplest browser-based utility for extracting regex matches from text. Load your text in the input form on the left, enter the regex below and you'll instantly get text that matches the given regex in the output area. Powerful, free, and fast. Load text – get all regexp matches. Created by developers from team Browserling.
announcement check out our new project!
We just created something new for all science fans – SCIURLS – a neat science news aggragator. Check it out!
fullscreen fullscreen_exit
Regular Expression
Enter the regular expression here.
Output Matches Separator
Enter the character that's used for separating matched items.
Regex matches extractor tool What is a regex matches extractor?
With this tool, you can extract regular expression matches from the given text. You can specify the regexp in the options above and this tool will find and return all regexp matches. You can also change the character that separates all output matches. Textabulous!
Regex matches extractor examples Click to use
Match and Extract Hex Colors
This example uses a regular expression that matches three or six character hexadecimal color codes. It finds all hex colors in the input text, returns a list of hex colors and separates them with a comma.
Each of the three pairs of digits in hex code #RRGGBB is responsible for its color - red, green and blue. Numbers can take the values of digits from 0 to 9 and letters from A to F. If all numbers are maximal, then the result is white color - #FFFFFF, if the numbers are minimal, it turns out black - #000000. If you change each pair, you get #FF0000 - the brightest red, #00FF00 - the brightest green and #0000FF - the brightest blue. Accordingly, #00FFFF is cyan, #FF00FF is magenta and #FFFF00 is yellow.
#FFFFFF, #000000, #FF0000, #00FF00, #0000FF, #00FFFF, #FF00FF, #FFFF00
Required options
These options will be used automatically if you select this example.
Enter the regular expression here.
Enter the character that's used for separating matched items.
Extract Text Fragment
In this example, we use a regex that matches one more characters between two numbers. It extracts a fragment of text that begins and ends with one or more digits.
The first woman to win a Nobel Prize was Marie Curie, who won the Nobel Prize in Physics in 1903 with her husband, Pierre Curie, and Henri Becquerel. Curie is also the only woman to have won multiple Nobel Prizes; in 1911, she won the Nobel Prize in Chemistry.
1903 with her husband, Pierre Curie, and Henri Becquerel. Curie is also the only woman to have won multiple Nobel Prizes; in 1911
Required options
These options will be used automatically if you select this example.
Enter the regular expression here.
Enter the character that's used for separating matched items.
Match Prices in Text
In this example, we enter a regexp to find prices in the given text. This regular expression takes into account various formats for displaying prices such as currency sign and cents separator that can be a dot or a comma.
Don't miss the sale of this season! Discounts on electronic goods up to 75%. You can purchase any TV from $300 or phones from €100. Buying a laptop from $499.99, get a 128GB USB flash drive as a gift.
$300 €100 $499.99
Required options
These options will be used automatically if you select this example.
Enter the regular expression here.
Enter the character that's used for separating matched items.
Pro tips Master online text tools
You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
https://onlinetexttools.com/extract-regex-matches-from-text?input=Each%20of%20the%20three%20pairs%20of%20digits%20in%20hex%20code%20%23RRGGBB%20is%20responsible%20for%20its%20color%20-%20red%2C%20green%20and%20blue.%20Numbers%20can%20take%20the%20values%20of%20digits%20from%200%20to%209%20and%20letters%20from%20A%20to%20F.%20If%20all%20numbers%20are%20maximal%2C%20then%20the%20result%20is%20white%20color%20-%20%23FFFFFF%2C%20if%20the%20numbers%20are%20minimal%2C%20it%20turns%20out%20black%20-%20%23000000.%20If%20you%20change%20each%20pair%2C%20you%20get%20%23FF0000%20-%20the%20brightest%20red%2C%20%2300FF00%20-%20the%20brightest%20green%20and%20%230000FF%20-%20the%20brightest%20blue.%20Accordingly%2C%20%2300FFFF%20is%20cyan%2C%20%23FF00FF%20is%20magenta%20and%20%23FFFF00%20is%20yellow.®ex=%2F%5C%23%28%5Ba-fA-F%5D%7C%5B0-9%5D%29%7B3%2C6%7D%2Fg&separator=%2C%20
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.