

{"id":66076,"date":"2019-08-09T14:45:41","date_gmt":"2019-08-09T09:15:41","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=66076"},"modified":"2021-02-17T21:32:19","modified_gmt":"2021-02-17T16:02:19","slug":"javascript-characters","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/javascript-characters\/","title":{"rendered":"JavaScript Characters &#8211; Learn to play with Characters in JS"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1455,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/JavaScript#Uses_outside_Web_pages&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251208180004\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/JavaScript&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 07:25:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-22 17:57:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-31 09:11:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-06 09:04:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-21 11:35:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-26 10:31:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-15 06:33:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-27 16:05:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-06 20:13:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-26 22:42:19&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-26 22:42:19&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Previously, we learned about <em><strong><a href=\"https:\/\/data-flair.training\/blogs\/javascript-data-structures\/\">JavaScript Data Structures<\/a><\/strong><\/em>, now, this DataFlair&#8217;s tutorial will follow JavaScript characters and all the special characters available for the programmer. These characters may be letters, numbers, symbols, etc. We will study all the categories of characters associated with JavaScript and what their uses are. We will learn different techniques to access and use these characters as per our requirement. The numerous special characters used in regular expressions are as follows:<\/p>\n<h2>What are JavaScript Characters?<\/h2>\n<h3>1. Assertions<\/h3>\n<p>These include look-ahead, look-behind, and conditional expressions and indicate that a match is possible in some way. The assertions available in JavaScript are as follows:<\/p>\n<table dir=\"ltr\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><strong>Assertions<\/strong><\/td>\n<td style=\"text-align: center\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">x(?= y) [<em>Look-ahead<\/em>]<\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019 <strong>if and only if<\/strong> (iff) followed by \u2018y\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">x(?! y) [<em>Negeted Look-ahead<\/em>]<\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019 iff not followed by \u2018y\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">(?&lt;= y) x [<em>Look-behind<\/em>]<\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019 iff \u2018y\u2019 precedes it.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">(?&lt;! y) x [<em>Negeted Look-behind<\/em>]<\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019 iff \u2018y\u2019 doesn\u2019t precede it.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">'This is a string.'.match(\/This(?= is)\/g)\r\n\/\/ [\"This\"]\r\n'This is a string.'.match(\/This(?! is)\/g)\r\n\/\/ null\r\n'This is a string.'.match(\/(?&lt;=is)This\/)\r\n\/\/ null\r\n'This is a string.'.match(\/(?&lt;! is)This\/)\r\n\/\/ [\"This\", index: 0, input: \"This is a string.\", groups: undefined]<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"img-gray-border aligncenter wp-image-67481 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output.jpg\" alt=\"assertions output - JavaScript Characters\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-assertions-output-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<h3>2. Boundaries<\/h3>\n<p>They include the beginnings and endings of lines and words. The following are the different boundaries in JavaScript:<\/p>\n<table dir=\"ltr\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><strong>Boundaries<\/strong><\/td>\n<td style=\"text-align: center\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>^<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches the beginning of input. It is case-sensitive, thus <strong>\/^J\/ <\/strong>matches JavaScript but not javascript. It has a different meaning when working with sets (explained further).<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>$<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches the end of the input. Thus, <strong>\/t$\/<\/strong> matches the \u2018t\u2019 in javascript, but not in \u2018data\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\b<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches a word boundary i.e. another word character doesn\u2019t follow or precede a word character. The length of a matched word boundary is zero.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\B<\/strong><\/td>\n<td>\n<div>\n<div>It matches a non-word boundary i.e. the previous and the next character are of the same type. The beginning and end of the string are non-words. This matches the following cases:<\/div>\n<div><\/div>\n<ul>\n<li>Before the first character of the string.<\/li>\n<li>After the last character of the string.<\/li>\n<li>Between two word characters.<\/li>\n<li>Between two non-word characters like spaces.<\/li>\n<li>The empty string.<\/li>\n<\/ul>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">'DataFlair'.match(\/^D\/)\r\n\/\/ [\"D\", index: 0, input: \"DataFlair\", groups: undefined]\r\n'DataFlair'.match(\/^d\/)\r\n\/\/ null\r\n'DataFlair'.match(\/r$\/)\r\n\/\/ [\"r\", index: 8, input: \"DataFlair\", groups: undefined]\r\n\"This is a DataFlair's JavaScript tutorial\".match(\/\\bData\/)\r\n\/\/ [\"Data\", index: 10, input: \"This is a DataFlair's JavaScript tutorial\", groups: undefined]\r\n\"This is a DataFlair's JavaScript tutorial\".match(\/\\B\/)\r\n\/\/ [\"\", index: 1, input: \"This is a DataFlair's JavaScript tutorial\", groups: undefined]<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"img-gray-border aligncenter wp-image-67482 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries.jpg\" alt=\"boundaries output - JavaScript Characters\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-boundaries-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<h3>3. Character Classes<\/h3>\n<p>These detect different kinds of characters like differentiating between letters and digits. Be sure you\u2019ve gone through our article on <a href=\"https:\/\/data-flair.training\/blogs\/javascript-strings\/\"><em><strong>JavaScript Strings<\/strong><\/em><\/a> so that you understand the meaning of every shorthand for escape characters. The most common characters in this category are as follows:<\/p>\n<table dir=\"ltr\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><strong>Character Classes<\/strong><\/td>\n<td style=\"text-align: center\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>.<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches any single character excluding the line terminators like \\n or \\r.<br \/>\nThe dot matches a literal dot inside a character set.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\d<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches any Arabic numeral, equivalent to [0-9].<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\D<\/strong><\/td>\n<td>\n<div>\n<div>It matches any character, not a digit (Arabic numeral), equivalent to [^0-9].<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\w<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches any alphanumeric character from the basic Latin alphabet, including the underscore, equivalent to [A-Za-z0-9_].<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\W<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches any alphanumeric character, not from the basic Latin alphabet, equivalent to [^A-Za-z0-9_].<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\s<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches any whitespace character like space, tab, form feed, etc. It is equivalent to [\\f\\n\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff].<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\S<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches any single character other than a whitespace character, equivalent to [^\\f\\n\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff].<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\t or \\u0009<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches a horizontal tab.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\n or \\u000A<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches a linefeed (newline).<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\v or \\u000B<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches a vertical tab.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\f or \\u000C<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches a form feed.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\r or \\u000D<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches a carriage return.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>[\\b]<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches a backspace.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\0 or \\u0000<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches a NULL character. (Do not follow this character with any other digit).<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\\<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It indicates that the following character is an escape character. It behaves in two ways:<\/div>\n<ul>\n<li style=\"text-align: center\">For literal characters like \\b, it indicates that the next letter is special, not a literal character.<\/li>\n<li style=\"text-align: center\">For special characters like *, it indicates that the next letter is special, not a literal character.<\/li>\n<\/ul>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>4. Sets and Ranges<\/h3>\n<p>This category indicates sets (groups) and ranges of expression characters. We search for several characters or character classes inside square brackets [&#8230;] to search for a given character or a series of characters. The list explaining them is as follows:<\/p>\n<table dir=\"ltr\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><strong>Sets and Ranges<\/strong><\/td>\n<td style=\"text-align: center\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x|y<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches either \u2018x\u2019 or \u2018y\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>[xyz]<\/strong><br \/>\n<strong>[a-c]<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It is a character set that matches any one of the enclosed characters.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>[^xyz]<\/strong><br \/>\n<strong>[^a-c]<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It is a complemented\/ negated character set. It matches everything not enclosed in the brackets.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>(x) (Capturing group)<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches and remembers \u2018x\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>(?:x) (Non-capturing group)<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches but doesn\u2019t remember \u2018x\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>(?&lt;Name&gt;x) (Named capturing group)<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019, stores it on the group\u2019s property of returned matches and specifies the name by <em>&lt;Name&gt;<\/em>. The angle brackets<em> &lt; &gt; <\/em>are essential.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The brackets we used above have additional functionality: no escaping. Generally, when we want to find the dot literal in our string, we use the <strong>escape character \\<\/strong>. In square brackets, we can use many characters like<strong> dot, plus, parentheses, <\/strong>etc. without escaping.<\/p>\n<p>We will use the above two categories of characters in the next tutorial, so all you need to do for now is understand how these characters work in JavaScript.<\/p>\n<p><em><strong>Do you know about <a href=\"https:\/\/data-flair.training\/blogs\/javascript-array\/\">JavaScript Array<\/a>?<\/strong><\/em><\/p>\n<h3>5. Quantifiers<\/h3>\n<p>It indicates the number of characters or expressions to match. The quantifiers provided by JavaScript are listed in the table below:<\/p>\n<table dir=\"ltr\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><strong>Quantifiers<\/strong><\/td>\n<td style=\"text-align: center\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x*<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>It matches \u2018x\u2019 occurring 0 or more times.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x+<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019 occurring 1 or more times, equivalent to {1,}.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x?<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">It matches \u2018x\u2019 occurring 0 or 1 time, default is greedy quantifier (matching the maximum number of times). If used after any of the quantifiers, it makes them non-greedy (matching the minimum number of times).<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x{n}<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">Here, n is a positive integer and matches exactly n occurrences of \u2018x\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x{n,}<\/strong><\/td>\n<td style=\"text-align: center\">\n<div>\n<div>n is a positive integer here and matches at least n occurrences of \u2018x\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>x{n,m}<\/strong><\/td>\n<td>\n<div>\n<div style=\"text-align: center\">Here, n is 0 or a positive integer and m is a positive integer such that m &gt; n. It matches at least n and at most m occurrences of \u2018x\u2019.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>var str = &#8220;DataFlair: Regular Expressions&#8221;<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">str.match(\/a*\/g)\r\n(31) [\"\", \"a\", \"\", \"a\", \"\", \"\", \"a\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"a\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"]\r\nstr.match(\/a+\/g)\r\n(4) [\"a\", \"a\", \"a\", \"a\"]\r\nstr.match(\/at?\/g)\r\n(4) [\"at\", \"a\", \"a\", \"a\"]\r\nstr.match(\/s{1}\/g)\r\n(3) [\"s\", \"s\", \"s\"]\r\nstr.match(\/s{1,}\/g)\r\n(2) [\"ss\", \"s\"]\r\nstr.match(\/s{1,2}\/g)\r\n(2) [\"ss\", \"s\"]<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"img-gray-border aligncenter wp-image-67483 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers.jpg\" alt=\"quantifiers output - JavaScript Characters\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-quantifiers-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<h3>6.\u00a0Unicode property escapes<\/h3>\n<p><strong> Surrogate Strings<\/strong><\/p>\n<p>All frequently used characters in JavaScript strings have 2-byte representation. But they only allow 65536 combinations; these are not enough to denote every possible symbol. Thus, rare symbols are encoded with a pair of 2-byte characters for additional combinations. These pairs (4-bytes) are popular by the term \u201csurrogate pairs\u201d. These did not exist at the time of <a href=\"https:\/\/en.wikipedia.org\/wiki\/JavaScript#Uses_outside_Web_pages\">JavaScript<\/a> creation, thus aren\u2019t always processed correctly by the language.<\/p>\n<p>Some of the Unicode values to compare surrogate strings with normal characters are as follows:<\/p>\n<table style=\"height: 380px\" width=\"647\">\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center\"><b>Character<\/b><\/p>\n<\/td>\n<td style=\"text-align: center\"><b>Unicode<\/b><\/td>\n<td style=\"text-align: center\"><b>Bytes<\/b><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: center\"><strong>A<\/strong><\/p>\n<\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0x0041<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">2<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>=<\/strong><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0x003D<\/span><\/td>\n<td>\n<p style=\"text-align: center\"><span style=\"font-weight: 400\">2<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: center\"><strong>\ud835\udcb3 (mathematical script X)<\/strong><\/p>\n<\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0x1d4b3<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">4<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><strong>\ud835\udcb4 (mathematical script Y)<\/strong><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0x1d4b4<\/span><\/td>\n<td>\n<p style=\"text-align: center\"><span style=\"font-weight: 400\">4<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">\ud83d\ude04<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0x1f604<\/span><\/td>\n<td>\n<p style=\"text-align: center\"><span style=\"font-weight: 400\">4<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>7. Flags<\/h3>\n<p>There are six flags in JavaScript that affect the search using regular expressions. These are clear in the table below:<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><b>Flags<\/b><\/td>\n<td>\n<p style=\"text-align: center\"><b>Description<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>i<\/strong><\/td>\n<td><span style=\"font-weight: 400\">This flag indicates that the search should be case-insensitive. This means the character a and A are the same.<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>g<\/strong><\/td>\n<td><span style=\"font-weight: 400\">If you set this flag, it means that the script will look for all the matches and return an array. If we skip this modifier, we only get the first match as a result.<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>m<\/strong><\/td>\n<td><span style=\"font-weight: 400\">This flag indicates a multiline mode and only affects the behavior of the characters<strong> ^<\/strong> and <strong>$<\/strong>. This mode is described in more detail later in the tutorial.<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>s<\/strong><\/td>\n<td><span style=\"font-weight: 400\">A dot doesn\u2019t usually match a newline (\\n) character. But the dotall mode allows a dot (.) to match newlines. The working of a dot operator is detailed further in the tutorial.<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>u<\/strong><\/td>\n<td><span style=\"font-weight: 400\">This flag enables full Unicode support and enables the correct processing of surrogate pairs.<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>y<\/strong><\/td>\n<td><span style=\"font-weight: 400\">The sticky flag \u201cy\u201d makes the regular expression search for a match at exactly the specified position and not move any further.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>8. Multiline Mode<\/h3>\n<p>The \u201cm\u201d flag enables the multiline mode in JavaScript, which affects the behavior of <strong>^<\/strong> and <strong>$<\/strong> characters. In this mode, the script not only searches for a match at the beginning or end of the string but also at the start or end of the string.<\/p>\n<p><strong>Line start ^:<\/strong> The expression <strong>\/^\\d+\/<\/strong> finds all the digits at the start of each line. See the difference in outputs when multiline mode is set and unset.<\/p>\n<p><strong>Line end $:<\/strong> The expression<strong> \/^\\d+\/<\/strong> finds all the digits at the start of each line. The difference in outputs, when multiline mode is set and unset, is clear in the code below.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">var str = `1. JavaScript\r\n2. Big Data\r\n3. Python`\r\nstr.match(\/^\\d+\/gm)\r\n\/\/ (3) [\"1\", \"2\", \"3\"]\r\nstr.match(\/^\\d+\/g)\r\n\/\/ [\"1\"]\r\nstr.match(\/\\w+$\/gim)\r\n\/\/ (3) [\"JavaScript\", \"Data\", \"Python\"]\r\nstr.match(\/\\w+$\/gi)\r\n\/\/ [\"Python\"]<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"img-gray-border aligncenter wp-image-67484 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode.jpg\" alt=\"multiline mode output - JavaScript Characters\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-multiline-mode-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<h3>9. The dot character<\/h3>\n<p>A <strong>dot<\/strong> character in JavaScript is a special character class that matches any character, except a newline. This means that the statement<strong> \u201cDataFlair\u201d.match(\/.\/);<\/strong> results in DataFlair. What happens when we try to match the string:<strong> &#8220;DataFlair\\n JavaScript&#8221;.match(\/.+\/)?<\/strong> We only get the first word as a match. If we want our program to read the newline too, all we need to do is set the <strong>dotall flag \u201cs\u201d.<\/strong> Try the code in the console and see what you get.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\"DataFlair\\n JavaScript\".match(\/.+\/)\r\n\/\/ [\"DataFlair\", index: 0, input: \"DataFlair\u21b5 JavaScript\", groups: undefined]\r\n\"DataFlair\\n JavaScript\".match(\/.+\/s)\r\n\/\/ [\"DataFlair\u21b5 JavaScript\", index: 0, input: \"DataFlair\u21b5 JavaScript\", groups: undefined]<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"img-gray-border aligncenter wp-image-67485 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall.jpg\" alt=\"dot character dotall output - JavaScript Characters\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-dot-character-dotall-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>In this JavaScript tutorial, we went through the different characters available to a user or a programmer. These characters are widely used in <a href=\"https:\/\/data-flair.training\/blogs\/javascript-regular-expression\/\"><em><strong>JavaScript<\/strong>\u00a0<strong>Regular Expressions<\/strong><\/em><\/a>, explained in the next tutorial. We also learned how we can manipulate the output with the combination of these characters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously, we learned about JavaScript Data Structures, now, this DataFlair&#8217;s tutorial will follow JavaScript characters and all the special characters available for the programmer. These characters may be letters, numbers, symbols, etc. We will&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":67506,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18979],"tags":[20835,20836,20837,20834,20838],"class_list":["post-66076","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-javascript-assertions","tag-javascript-boundaries","tag-javascript-character-classes","tag-javascript-characters","tag-javascript-quantifiers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Characters - Learn to play with Characters in JS - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about different JavaScript characters; assertions, boundaries, quantifiers, flags, etc with the help of implementation examples. Study all the categories of characters associated with JavaScript along with their uses.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/javascript-characters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Characters - Learn to play with Characters in JS - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about different JavaScript characters; assertions, boundaries, quantifiers, flags, etc with the help of implementation examples. Study all the categories of characters associated with JavaScript along with their uses.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/javascript-characters\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-09T09:15:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-17T16:02:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-Characters.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Characters - Learn to play with Characters in JS - DataFlair","description":"Learn about different JavaScript characters; assertions, boundaries, quantifiers, flags, etc with the help of implementation examples. Study all the categories of characters associated with JavaScript along with their uses.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/javascript-characters\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Characters - Learn to play with Characters in JS - DataFlair","og_description":"Learn about different JavaScript characters; assertions, boundaries, quantifiers, flags, etc with the help of implementation examples. Study all the categories of characters associated with JavaScript along with their uses.","og_url":"https:\/\/data-flair.training\/blogs\/javascript-characters\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-08-09T09:15:41+00:00","article_modified_time":"2021-02-17T16:02:19+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-Characters.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"JavaScript Characters &#8211; Learn to play with Characters in JS","datePublished":"2019-08-09T09:15:41+00:00","dateModified":"2021-02-17T16:02:19+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/"},"wordCount":1524,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-Characters.jpg","keywords":["JavaScript Assertions","JavaScript Boundaries","JavaScript Character Classes","JavaScript Characters","JavaScript Quantifiers"],"articleSection":["JavaScript Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/javascript-characters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/","url":"https:\/\/data-flair.training\/blogs\/javascript-characters\/","name":"JavaScript Characters - Learn to play with Characters in JS - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-Characters.jpg","datePublished":"2019-08-09T09:15:41+00:00","dateModified":"2021-02-17T16:02:19+00:00","description":"Learn about different JavaScript characters; assertions, boundaries, quantifiers, flags, etc with the help of implementation examples. Study all the categories of characters associated with JavaScript along with their uses.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/javascript-characters\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-Characters.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/08\/JavaScript-Characters.jpg","width":802,"height":420,"caption":"JavaScript Characters Tutorial"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/javascript-characters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"JavaScript Tutorial","item":"https:\/\/data-flair.training\/blogs\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Characters &#8211; Learn to play with Characters in JS"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/66076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=66076"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/66076\/revisions"}],"predecessor-version":[{"id":67693,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/66076\/revisions\/67693"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/67506"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=66076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=66076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=66076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}