[{"id":"ca257e3e-9292-470e-9d7a-096b7c93a20e","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"86f1e123-ff2a-4ea0-a255-1c563fd53a4c","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"48d62b40-1243-44d3-bb0c-20b1335e100e","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"a479940a-f4be-4b31-a8fe-21d04270b6b3","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"dc5879f1-1f4e-415e-9d68-234f475c6ffb","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"e0f082cd-9797-4731-a08b-29ba133811cc","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"62fc4bd3-ab67-44d6-986f-2fe4c9558bdb","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"140ce507-8f59-4038-9016-33c5efc6837c","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"996f6920-d668-4adf-808a-356cee2027d0","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"fae22100-16a8-4d38-9b42-377af58552f4","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"14c6b426-94eb-4b0f-8803-3dae265130bd","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"29ea6a57-be42-4ee1-9ea1-4556452433e2","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"133b00a6-e011-4383-8723-46ac57dd361c","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"95e6d892-7bcd-4f6a-a152-504dec37c741","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"ff2fda3b-2365-49e2-ac9d-552284e45c73","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"3a7fa7b2-f252-436c-a1d1-5dd3c39a51ca","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"612ac80c-894b-4ae5-9ddc-5ff5cc2d0e8d","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"8f38e4df-4e2a-4a3a-ad58-6455d17b2506","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"a5da5dfc-4538-4c30-bb2b-654ffab99ffc","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"56963b79-20a3-4e91-9154-6bb0620b8ef7","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"6a9a4310-c4ee-49e1-9d51-6e2ebf757af4","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"b9d50243-49fa-405e-8804-7952197967b8","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"fa6afaf7-2038-42b0-8d43-86dfe46042cd","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"119624ed-fc48-46e9-aa43-89d7e2642cae","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"a6083f9e-9f9f-4a8e-96de-a043142d0282","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"5fdbcfd3-89c6-4a0c-83f0-a42fe72ba1f2","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"091efdad-d40d-4a8f-80de-a4332c0d6cfa","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"1dfbf182-8b10-492f-af29-a693d3db1ba5","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"6c0fdf26-682b-4deb-a278-ab57684d2cdc","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"46ac94dc-0e36-4cf5-a4b6-ad12b290f7b0","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"bd521645-2c83-4f3d-82ff-b17fa70faacd","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"36dc7e35-c17b-401d-b90f-b2141363afd0","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"fb1e533a-d61d-423a-ac26-beea6046ac5c","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"07e7a0bb-cca2-4bf8-84f8-caea8571c631","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"a250185e-b09b-4a0f-8c42-dade416924a4","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"6ea790e0-5d8e-4666-bba8-e344abbca974","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"165ce06c-c29a-458e-9ea9-e362afa3407d","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"f9c5b950-f2ab-4fc6-b584-e3f2f9150fae","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]},{"id":"038db070-9dd8-4837-9c23-e8289b588bae","tags":[{"name":"Upd","color":"Blue","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"2f377cfe-f512-431a-895b-f89af32041ce"}]},{"id":"21eb86b7-ba90-4b53-8576-fd57998f80bd","tags":[{"name":"New","color":"Red","productId":"c15646e4-63d8-4965-8d62-7549a2986e99","links":null,"id":"c3c0ef13-c7a9-4649-9fcb-23b3abec175d"}]}]
        
(Showing Draft Content)

REPLACE

This function helps to replace part of a text string with a different text string using regular expressions. 

Syntax

SJS.REGEXREPLACE(text, regular_expression, replacement, [modifiers])

Arguments 

This function has the following arguments: 

Argument

Description

text

Refers to the text you are trying to replace. The function can input a string, a cell reference, or a cell range reference.

regular_expression

A regular expression that replaces all matching instances of the text.

replacement

Refers to the text that can be inserted in place of original text according to the regular_expression.

modifiers

[Optional] Input to define the pattern. 

  • g (global): retains the index of the last match and allows subsequent searches to start from the end of the previous match. 

  • i (ignore case): makes the whole expression case insensitive. 

  • m (multiline): when enabled, beginning and end anchors are matched with the start and end of a line, instead of the start and end of the whole string. 

  • u (unicode): when enabled, you can use extended unicode escapes in the form. 

  • s (dotall): dot is matched to any character, including newline. 

Remarks

  • You can use this function with text (not numbers) as input and return text as output.

  • If you want numbers as output. Use VALUE function in conjunction with this function.

  • If you want to use numbers as input, convert them to text using the TEXT function.

Examples 

SJS.REGEXREPLACE("SpreadJS Worksheet", "s.*t", "book") gives the result SpreadJS Worksheet

SJS.REGEXREPLACE("12/23/2022", "(\d{2})/(\d{2})/(\d{4})", "$3-$1-$2") gives the result 2022-12-23

SJS.REGEXREPLACE("John-Smith", "(\w{4})-(\w{5})", "$2 $1") gives the result Smith John

Errors  

  • returns a #VALUE! error if the value type of text or regular_expression is not text.  

  • returns a #N/A error if the length of the parameters < 3.   

  • returns a #NAME error if any parameter is not valid.