The \v metacharacter matches a vertical tab (VT, U+000B)—a legacy control character that advances to the next vertical tab stop. It is rarely seen in modern text, but knowing it helps when cleaning old files or understanding the full \s whitespace class.
01
VT char
\v
02
U+000B
VT control
03
vs \t
Horizontal tab
04
In \s
Whitespace
05
Remove
replace(/\v/g)
06
Legacy
Rare today
Fundamentals
Introduction
JavaScript regular expressions include escapes for several control characters. You already know \t (horizontal tab) and \n (newline). The \v metacharacter targets the vertical tab—a separate character with its own Unicode code point.
Vertical tabs are uncommon in web content, JSON, and everyday strings. They appear more often in legacy printer formats, old terminal data, or accidentally corrupted text. When you need to detect or strip them, /\v/ gives you precise control instead of matching every whitespace type with \s.
Concept
Understanding the \v Metacharacter
\v matches the vertical tab character (Unicode U+000B, ASCII 11). In JavaScript string literals, "\v" creates the same character that /\v/ matches in a regex.
Vertical tab is included in \s but is not the same as horizontal tab (\t) or newline (\n). Each escape matches exactly one specific control character.
💡
Beginner Tip
If you only need “any whitespace,” use \s. Reach for \v when you specifically want to find or remove vertical tab characters without touching spaces or newlines.
Usage
How to Use \v in JavaScript
Use \v in detection, cleaning, splitting, and validation workflows:
Pair \v with the global flag for bulk removal, or combine with other control-character escapes when sanitizing imported legacy data.
Foundation
📝 Syntax
JavaScript
\v // one vertical tab
\v+ // one or more vertical tabs
/\v/g // global: every vertical tab
split(/\v/) // split on vertical tab
\s // any whitespace (includes \v)
Common patterns
/\v/ — detect whether a vertical tab exists.
/\v/g with replace("", ...) — remove all vertical tabs.
/[\t\n\v\r\f]/ — match common control whitespace explicitly.
/\u000B/ — same character using the Unicode escape form.
Cheat Sheet
⚡ Quick Reference
Goal
Pattern
One vertical tab
\v
Remove all vertical tabs
/\v/g
Split on vertical tab
split(/\v/)
Any whitespace
\s
Horizontal tab
\t
Code point
U+000B (VT)
Compare
📋 \v vs \t vs \n vs \s
Four related patterns for tab and whitespace handling.
Vertical tab
\v
U+000B VT
Horizontal tab
\t
U+0009 HT
Newline
\n
U+000A LF
Whitespace
\s
All of the above + more
Hands-On
Examples Gallery
Open DevTools Console (F12) or use Try-it links. Examples cover detection, comparison with other control chars, removal, the \s class, and splitting on a vertical tab delimiter.
📚 Getting Started
Detect whether a string contains a vertical tab character.
Example 1 — Test for a Vertical Tab Character
Return true when a vertical tab appears in the text.
A single \v matches one vertical tab character. Strings with only spaces or horizontal tabs do not satisfy the pattern because those are different code points.
📈 Practical Patterns
Compare, clean, and parse text containing vertical tabs.
Example 2 — Compare \v, \t, and \n
Count each control character type in a mixed string.
Each escape matches a distinct character. This helps when you need to normalize one type without affecting others—for example, removing \v but keeping \t delimiters.
Example 3 — Remove Vertical Tab Characters
Strip vertical tabs from legacy or corrupted text.
JavaScript’s \s includes vertical tab along with space, tab, newline, carriage return, and form feed. Use \v when you need VT specifically, not all whitespace.
Example 5 — Split on a Vertical Tab Delimiter
Break a string at vertical tab boundaries (rare but valid delimiter).
Equivalent Unicode form: \u000B matches the same character as \v.
Compatibility
Browser & Runtime Support
The \v vertical tab metacharacter is part of core JavaScript regular expression syntax.
✓ Baseline · ES3+
RegExp \v
Supported in every browser and Node.js version. \v matches the vertical tab control character (U+000B).
99%Universal syntax
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
\vExcellent
Bottom line: Safe everywhere. Use \v when you need to target vertical tabs specifically, beyond general \s whitespace.
Wrap Up
Conclusion
The \v metacharacter matches the vertical tab character (U+000B). It is a legacy control character rarely seen in modern text, but it belongs to the full set of whitespace characters that \s can match.
Use /\v/g to remove vertical tabs from old files, compare with \t and \n when auditing control characters, and remember that \v is not interchangeable with horizontal tab. Next, learn the \w word-character metacharacter.
Use \s when any whitespace separator is acceptable
Know that \u000B is equivalent to \v
❌ Don’t
Confuse \v (vertical) with \t (horizontal tab)
Expect vertical tabs in typical web or JSON content
Forget the global flag when replacing all vertical tabs
Assume \n and \v behave the same way
Strip \v when you actually need \t delimiters
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about RegExp \v
Match the vertical tab control character for legacy text cleanup.
5
Core concepts
📝01
VT
\v
Syntax
📈02
U+000B
VT code.
Unicode
🚫03
\t
Horizontal.
Compare
🔒04
/\v/g
Remove.
Clean
🔢05
\s
Includes VT.
Related
❓ Frequently Asked Questions
\v matches the vertical tab character (VT, Unicode U+000B, ASCII 11). It is a legacy control character that moves to the next vertical tab stop on the same column.
No. \t is horizontal tab (U+0009), \n is line feed/newline (U+000A), and \v is vertical tab (U+000B). Each is a distinct single character with its own code point.
Yes. In JavaScript, the \s whitespace class includes vertical tab along with space, horizontal tab, newline, carriage return, and form feed.
Very rare. Most everyday text uses spaces, horizontal tabs, and newlines. You may encounter \v in legacy files, printer control data, or corrupted pasted content.
Use replace with the global flag: text.replace(/\v/g, "") to delete them, or replace with a space if you prefer to preserve word separation.
The \v escape is core regex syntax since ES3. It works in every browser and Node.js version without extra flags.
Did you know?
Vertical tab was designed for old line printers to advance paper vertically without starting a new line. Modern software almost always uses \n for line breaks and \t for indentation instead—which is why \v is included in \s but rarely appears in real-world strings.