I wonder what would be the way to to extract text from data list? I’ve found some similar cases where python was used to solve this issue. However, trying it myself gave no result because script had to be adapted and I know no code at all.
I need to learn how to program. I feel like this should be easier with the native Grasshopper components. Maybe there is something I don’t see in the text components that could help me?
I suspect he only wants the number after the ø and the value between the brackets. The first line is the name of the connection. The second is the bolt diameter and quantity. List item will reduce the problem to the specific numbers needed. Once found, one can re-assemble the tree to contain the data in a more useful format for equipment downstream in number format or a string. Maybe:
I mean, if that’s the way it is, and the structure is predictable, you could just target the second item of the list and use the appropriate separators for Split Text… I am guessing this is what you are saying.
Is there someone out there who, for the love of all that is holy, can script a component that outputs the domains of a RegEx search match instead of simple booleans?
This is a very odd problem. He seems to be trying to extract information from dimension text. I do not follow that. Presumably the dimension text was to individual circles or groups of circles. To me the more logical approach is to get the data needed from the objects to avoid an error if some of the text is changed. I will wait to see the reason here.
I asked Claude and it was suggested to paste the text from the panel and copy the diameter symbol from that. I think I have split out the data now. I am not sure about the first line of data.
Although the OP has marked this as a solution, it should be noted that it only works with ASCII characters and fails with their posted data which has unicode characters lying outside the ASCII range:
Here’s a solution using a couple of regex components from the current beta release of Greg, the Grasshopper Regex plug-in.
The first is using the \w shorthand for unicode word characters to find the individual words in the input strings; the second is stripping out the Ø (the ‘Latin O with stroke’ character, U+D8, rather than the diameter symbol, U+2300, which is why it is passed as part of a word by the first component).