{"id":1360,"date":"2017-03-20T20:07:21","date_gmt":"2017-03-20T14:37:21","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=1360"},"modified":"2017-03-29T11:29:42","modified_gmt":"2017-03-29T05:59:42","slug":"can-replace-string-files","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/can-replace-string-files\/","title":{"rendered":"How can I replace a string in a file(s)"},"content":{"rendered":"<p><span style=\"color: #ff6600;\"><strong>Replacing strings in files based on certain search criteria is a very common task. How can I<\/strong><\/span><\/p>\n<ul>\n<li>replace string foo with bar in all files in the current directory?<\/li>\n<li>do the same recursively for sub directories?<\/li>\n<li>replace only if the file name matches another string?<\/li>\n<li>replace only if the string is found in a certain context?<\/li>\n<li>replace if the string is on a certain line number?<\/li>\n<li>replace multiple strings with the same replacement<\/li>\n<li>replace multiple strings with different replacements<\/li>\n<\/ul>\n<p><label class=\"label label-info\">SOLUTION 1:<\/label><\/p>\n<p>Replacing all occurrences of one string with another in all files in the current directory:<\/p>\n<ul>\n<li>These are for cases where you\u00a0know\u00a0that the directory contains only regular files and that you want to process all non-hidden files. If that is not the case, use the another approaches .<\/li>\n<li>All<b>\u00a0<\/b><b>sed<\/b>\u00a0solutions in this answer assume GNU\u00a0sed. If using FreeBSD or OS\/X, replace\u00a0<b>\u2013<\/b><b>i<\/b>\u00a0with\u00a0-i \u201d. Also note that the use of the\u00a0-i\u00a0switch with any version of\u00a0<b>sed<\/b>\u00a0has certain <b>filesystem<\/b>\u00a0security implications\u00a0and is inadvisable in any script which you plan to distribute in any way.<\/li>\n<\/ul>\n<p><b>Non <\/b><b>recursive<\/b>, files in this directory only:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20*%20%0A%20%20%20%20%20%20%20%20%20%20perl%20-i%20-pe%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20.%2F*%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[ad type=\u201dbanner\u201d]\n<p>(the\u00a0perl\u00a0one will fail for file names ending in\u00a0|\u00a0or space)).<\/p>\n<p><b>Recursive<\/b>, regular files <b>(including hidden ones<\/b>) in this and all subdirectories<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dfind%20.%20-type%20f%20-exec%20sed%20-i%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20%7B%7D%20%2B%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>If you are using zsh:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20**%2F*(D.)%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>(may fail if the list is too big, see\u00a0zargs\u00a0to work around).<\/p>\n<p>Bash can\u2019t check directly for regular files, a loop is needed (braces avoid setting the options globally):<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201d(%20shopt%20-s%20globstar%20dotglob%3B%0A%20%20%20%20%20%20%20for%20file%20in%20**%3B%20do%0A%20%20%20%20%20%20%20if%20%5B%5B%20-f%20%24file%20%5D%5D%20%26%26%20%5B%5B%20-w%20%24file%20%5D%5D%3B%20then%20%0A%20%20%20%20%20%20%20%20sed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20%22%24file%E2%80%9C%0A%20%20%20%20%20%20%20%20fi%20%0A%20%20%20%20%20%20%20%20done%20)%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>The files are selected when they are actual files (-f) and they are writable (-w).<\/p>\n<p><label class=\"label label-info\">SOLUTION 2:<\/label><\/p>\n<p>Replace only if the file name matches another string \/ has a specific extension \/ is of a certain type etc:<\/p>\n<p>Non-recursive, files in this directory only:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20*baz*%20%23%23%20all%20files%20whose%20name%20contains%20baz%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20*.baz%20%23%23%20files%20ending%20in%20.baz%0A%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>Recursive, regular files in this and all subdirectories<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dfind%20.%20-type%20f%20-name%20%22*baz*%22%20-exec%20sed%20-i%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20%7B%7D%20%2B%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[pastacode lang=\u201djavascript\u201d manual=\u201d(%20shopt%20-s%20globstar%20dotglob%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20**baz*%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20**.baz%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[ad type=\u201dbanner\u201d]\n<p>If you are using <b>zsh<\/b><b>:<\/b><\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20**%2F*baz*(D.)%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20**%2F*.baz(D.)%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>The\u00a0\u2014\u00a0serves to tell\u00a0sed\u00a0that no more flags will be given in the command line. This is\u00a0 useful to protect against file names starting with<b>\u00a0-.<\/b><\/p>\n<p>If a file is of a certain type, for example, executable (see\u00a0man find\u00a0for more options):<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201df%20ind%20.%20-type%20f%20-executable%20-exec%20sed%20-i%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20%7B%7D%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20zsh%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-i%20\u2013%20\u2019s%2Ffoo%2Fbar%2Fg\u2019%20**%2F*(D*)%20%20%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><label class=\"label label-info\">SOLUTION 3:<\/label><\/p>\n<p>Replace only if the string is found in a certain context<\/p>\n<p>Replace\u00a0foo\u00a0with\u00a0bar\u00a0only if there is a\u00a0<b>baz<\/b>\u00a0later on the same line:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u2019s%2Ffoo%5C(.*baz%5C)%2Fbar%5C1%2F\u2019%20file%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>In\u00a0<b>sed<\/b>, using\u00a0\\( \\)\u00a0saves whatever is in the parentheses and you can then access it with\u00a0\\1. There are many \u00a0variations of this theme, to learn more about such regular expressions,<\/p>\n<p>Replace\u00a0foo\u00a0with\u00a0bar\u00a0only if\u00a0foo\u00a0is found on the 3d column (field) of the input file (assuming whitespace-separated fields):<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dgawk%20-i%20inplace%20\u2019%7Bgsub(%2Ffoo%2F%2C%22baz%22%2C%243)%3B%20print%7D\u2019%20file(needs%C2%A0gawk%C2%A04.1.0%20or%20newer).%0A%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>For a different field just use\u00a0$N\u00a0where\u00a0N\u00a0is the number of the field of interest.<\/p>\n<p>For a different field separator (:\u00a0in this example) use<\/p>\n<p>\u00a0<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dgawk%20-i%20inplace%20-F\u2019%3A\u2019%20\u2019%7Bgsub(%2Ffoo%2F%2C%22baz%22%2C%243)%3Bprint%7D\u2019%20file%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>Another solution using\u00a0perl:<\/p>\n<p>\u00a0<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dperl%20-i%20-ane%20\u2019%24F%5B2%5D%3D~s%2Ffoo%2Fbaz%2Fg%3B%20%24%22%20%3D%20%22%20%22%3B%20print%20%22%40F%5Cn%22\u2019%20foo%20\u2033 message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>Both the\u00a0awk\u00a0and\u00a0perl\u00a0solutions will affect spacing in the file (remove the leading and trailing blanks, and convert sequences of blanks to one space character in those lines that match). For a different field, use\u00a0$F[N-1]\u00a0where\u00a0N\u00a0is the field number you want and for a different field separator use (the\u00a0$\u201d=\u201d:\u201d\u00a0sets the output field separator to\u00a0:):<\/p>\n<p><b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/b><\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201d%20%20%20%20%20%20%20%20%20%20%20%20%20%20perl%20-i%20-F\u2019%3A\u2019%20-ane%20\u2019%24F%5B2%5D%3D~s%2Ffoo%2Fbaz%2Fg%3B%20%24%22%3D%22%3A%22%3Bprint%20%22%40F%22\u2019%20foo%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>Replace\u00a0foo\u00a0with\u00a0bar\u00a0only on the 4th line:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u20194s%2Ffoo%2Fbar%2Fg\u2019%20file%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gawk%20-i%20inplace%20\u2019NR%3D%3D4%7Bgsub(%2Ffoo%2F%2C%22baz%22)%7D%3B1\u2019%20file%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20perl%20-i%20-pe%20\u2019s%2Ffoo%2Fbar%2Fgif%20%20%20%24.%3D%3D4\u2019%20file%20%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><label class=\"label label-info\">SOLUTION 4:<\/label><\/p>\n<p>Multiple replace operations: replace with different strings<\/p>\n<p>You can combine<b>\u00a0<\/b><b>sed<\/b>\u00a0commands:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-i%20\u2019s%2Ffoo%2Fbar%2Fg%3B%20s%2Fbaz%2Fzab%2Fg%3B%20s%2FAlice%2FJoan%2Fg\u2019%20file\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[ad type=\u201dbanner\u201d]\n<p>Be aware that order matters (sed \u2018s\/foo\/bar\/g; <b>s\/bar\/<\/b><b>baz<\/b><b>\/g<\/b>\u2018\u00a0will substitute\u00a0foo\u00a0with\u00a0<b>baz<\/b>).<\/p>\n<p><b>Perl commands:<\/b><\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dperl%20-i%20-pe%20\u2019s%2Ffoo%2Fbar%2Fg%3B%20s%2Fbaz%2Fzab%2Fg%3B%20s%2FAlice%2FJoan%2Fg\u2019%20file%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>If you have a large number of patterns, it is easier to save your patterns and their replacements in a\u00a0<b>sed<\/b><b>\u00a0<\/b>script file:<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201d%23!%20%2Fusr%2Fbin%2Fsed%20-f%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%2Ffoo%2Fbar%2Fg%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%2Fbaz%2Fzab%2Fg%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>If you have too many pattern pairs for the above to be feasible, you can read pattern pairs from a file (two space separated patterns, $pattern and $replacement, per line):<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dwhile%20read%20-r%20pattern%20replacement%3B%20do%20%0A%20sed%20-i%20%22s%2F%24pattern%2F%24replacement%2F%22%20file%20%0A%20done%20%3C%20patterns.txt%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>That will be quite slow for long lists of patterns and large data files so you might want to read the patterns and create a\u00a0<b>sed<\/b>\u00a0script from them instead.\u00a0\u00a0 The\u00a0 following assumes a\u00a0<space>\u00a0delimiter separates a list of\u00a0MATCH<space>REPLACE\u00a0pairs occurring one-per-line in the file\u00a0<b>patterns.txt\u00a0:<\/b><\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201d%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20\u2019s%7C%20*%5C(%5B%5E%20%5D*%5C)%20*%5C(%5B%5E%20%5D*%5C).*%7Cs%2F%5C1%2F%5C2%2Fg%7C\u2019%20%3Cpatterns.txt%20%7C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-f-%20.%2Feditfile%20%3Eoutfile%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<ul>\n<li>The above format is largely arbitrary and, for example, doesn\u2019t allow for a\u00a0<space>\u00a0in either of\u00a0MATCH\u00a0or\u00a0REPLACE.<\/li>\n<li>\u00a0if\u00a0 you can create an output stream which looks like a\u00a0sed\u00a0script, then you can source that stream as a\u00a0<b>sed<\/b>\u00a0script by specifying\u00a0<b>sed\u2019s<\/b> script file as\u00a0\u2013<b>stdin<\/b>.<\/li>\n<li>You can combine and concatenate multiple scripts in similar fashion:<\/li>\n<\/ul>\n[pastacode lang=\u201djavascript\u201d manual=\u201dSOME_PIPELINE%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-e\u2019%23some%20expression%20script\u2019%20%5C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20-f.%2Fscript_file%20-f-%20%5C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20-e%E2%80%98%23more%20%20inline%20expressions\u2019%20%5C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.%2Factual_edit_file%20%3E.%2Foutfile%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<ul>\n<li>\u00a0A POSIX\u00a0<b>sed<\/b>\u00a0will concatenate all scripts into one in the order they appear on the command-line. None of these need end in a\u00a0\\newline.<\/li>\n<li>grep\u00a0can work the same way:<\/li>\n<\/ul>\n[pastacode lang=\u201djavascript\u201d manual=\u201d%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-e\u2019%23generate%20a%20pattern%20list\u2019%20%3Cin%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grep%20-f-%20.%2Fgrepped_file%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<ul>\n<li>When working with fixed-strings as patterns, it is good practice to escape regular expression\u00a0metacharacters. You can do this rather easily:<\/li>\n<\/ul>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20\u2019s%2F%5B%5D%24%26%5E*%5C.%2F%5B%5D%2F%5C%5C%26%2Fg%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%7C%20*%5C(%5B%5E%20%5D*%5C)%20*%5C(%5B%5E%20%5D*%5C).*%7Cs%2F%5C1%2F%5C2%2Fg%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20\u2019%20%20%3Cpatterns.txt%20%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sed%20-f-%20.%2Feditfile%20%3Eoutfile%20%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><label class=\"label label-info\">SOLUTION 5:<\/label><\/p>\n<p><strong>Multiple replace operations: replace multiple patterns with the same string<\/strong><\/p>\n<p>Replace any of\u00a0foo,\u00a0bar\u00a0or\u00a0baz\u00a0with\u00a0foobar<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dsed%20-Ei%20\u2019s%2Ffoo%7Cbar%7Cbaz%2Ffoobar%2Fg\u2019%20file%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>or\u00a0 using perl<\/p>\n[pastacode lang=\u201djavascript\u201d manual=\u201dperl%20-i%20-pe%20\u2019s%2Ffoo%7Cbar%7Cbaz%2Ffoobar%2Fg\u2019%20file%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><label class=\"label label-info\">SOLUTION 6:<\/label><\/p>\n<ul>\n<li>If you have list of files you can use,<\/li>\n<\/ul>\n[pastacode lang=\u201djavascript\u201d manual=\u201dreplace%20%22old_string%22%20%22new_string%22%20\u2013%20file_name1%20file_name2%20file_name3%20%0A\u201d message=\u201djavascript code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n","protected":false},"excerpt":{"rendered":"<p>Replacing strings in files based on certain search criteria is a very common task. How can I replace string foo with bar in all files in the current directory? do the same recursively for sub directories? replace only if the file name matches another string? replace only if the string is found in a certain [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[275],"tags":[2712,2718,2715,2713,2704,2706,2707,2714,2705,2719,2710,2717,2709,2716,2711,2708],"class_list":["post-1360","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-and-replace-missing-values","tag-find-and-replace-in-path-exclude-test-files","tag-how-can-i-delete-everything-between-two-markers-in-a-file","tag-how-can-i-extractchange-lines-in-a-text-file-whose-data-are-separated-into-fields","tag-how-can-i-replace-a-specific-string-within-a-line-inside-a-text-file","tag-how-to-change-a-single-line-in-multiple-files","tag-how-to-modify-file-content","tag-how-to-replace-string-in-files-except-with-a-line-begins-with","tag-modify-part-of-line-if-keyword-is-found-using-sed","tag-replace-list-regex-replace-string","tag-replace-multiline-string-in-files","tag-replace-multiple-lines-with-a-string-when-the-line-numbers-are-stored-in-a-file","tag-replace-string-with-sequential-index","tag-replace-strings-in-a-file-based-on-a-list-of-strings-and-a-list-of-corresponding-replacements","tag-transpose-a-file","tag-why-wont-my-change-to-the-sshd_config-file-persist"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=1360"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1360\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=1360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=1360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=1360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}