JavaScript RegExp \v Metacharacter

The regex "\v" shows the available vertical tab character in the input string in JavaScript. If the vertical tab element is available, then the position of the values shows; otherwise, the "-1" value shows using the search method. We can test, search, and match the required string using this Metacharacter.

Syntax

The syntax shows the vertical tab character of the input string.

or

Supported Browsers

The RegExp \v Metacharacter supports the following browsers supported using the javascript function:

  • Google Chrome
  • Apple Safari
  • Mozilla Firefox
  • Opera
  • Internet Explorer

Examples

The following examples are used to search, match, test, and execute vertical tab character values using JavaScript's "\v" regex metacharacter.

Example 1

The following example shows the test vertical tab character metacharacter of the regex in JavaScript. The test method shows true or false if the value is available.

Output

The output shows the vertical tab character of the string.

JavaScript RegExp \v Metacharacter

Example 2

The following example shows the vertical tab character metacharacter position of the regex in JavaScript. If the vertical tab character value is unavailable, then "-1" shows as an output.

Output

The output shows the position of the vertical tab character of the string.

JavaScript RegExp \v Metacharacter

Example 3

The following example shows the vertical tab character metacharacter position of the regex in JavaScript. If the vertical tab value is unavailable, then "null" shows as an output.

Output

The output shows the position of the vertical tab character of the string.

JavaScript RegExp \v Metacharacter

Example 4

The following example shows the vertical tab character metacharacter position of the regex in JavaScript. If the vertical tab value is unavailable, then "null" shows as an output.

Output

The output shows the replace value of the vertical tab character of the string.

JavaScript RegExp \v Metacharacter

Conclusion

The regular expression helps to find vertical tab characters in the information using JavaScript methods. The simple meta-character is used to help validate user-interactive data.






Latest Courses