Skip to content

Regex limit the number of letters total in the entire string

I have this expression which is almost what I need: except, I need to only allow 4 letters total (4 in the beginning and 0 in the end,3 and 1, 2 and 2, 0 and 4, etc…) allowed inputs: 11abcd11 1abcdefg123 abcd1234 unallowed inputs: 1abcd11 abcd123 1abcd12 is there a way to achieve this? thanks! Answer To…

Rselenium – cannot download spreadsheet in iframe

I am trying to download soil fertility data from the following website: https://soilhealth.dac.gov.in/publicreports/FertilityIndex I have got to the point where I can load the spreadsheet containing the data within an iframe. However I cannot figure out how to access the download button. This is the code I ha…

How to iterate recursively over all children in nested objects

I am trying to iterate over all objects in my array and all children and for each I want to set the folded property to false But I am getting an error: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Here is my array: And here is my function Answer You are passing child whi…

Nesting for loop automatic

I have a array with objects and those objects consist of some arrays. I wanna loop through the entire array and the array inside the objects. Sound complicated but if you look at the example below it works. However my problem is that right now the length of the variables array is 2, but how can i implement so…