Skip to content

JS Regex match numbers between brackets

I have the following code, but getting no output. When I run it here it seems to work: https://regex101.com/r/FVkJfF/1 To clarify, I aim to capture all the values between the brackets if they contain a number (including the opening and closing bracket of that group) Guess I am doing something wrong somewhere?…

Google Sheets Script Array Length Returning Null

See code below and log. I am working on a google sheets script that updates a google sheet when a linked google form is submitted. To do this I am using the array “event.namedValues”, which is generated automatically when a form is submitted. However while debugging some issues (and learning how t…

Find Missing Character in a Character Array (javascript)

I am trying to write a function that takes in an array of individual characters (eg.[‘a’,’b’,’d’]) and returns the first character that is missing (eg. ‘c’). I am not sure why my current function doesn’t work as described. ps. I’ve seen similar appro…

Preventing orphaned words but exclude tag

I’m using the answer from this question to prevent orphaned words by inserting &nbsp; between the last two word within paragraphs and headings. As the author states, it doesn’t work when the last word is inside the <a> tag. So renders as Can this be fixed so that it ignores any content i…