Separate parts of text when it starts in capital letters

Hello, I am working with a JSON that returns the values ​​all together without separations. Example: “Value one Value two Value three”

So I want to know if it is possible to separate the text when a part of the text starts in uppercase.

No, the original value it returns to me is like this: Opuntia microdays Echinopsis zucc Mammillaria elongata…

Using regex extension from @Kevinkun

1 Like

Thanks, now in a while I’ll try it and let you know :love_you_gesture: :love_you_gesture:

1 Like

I tried it but it is not what I am looking for, the result returns only the words that start with a capital letter and eliminates those that begin with a lowercase. What I want is to be able to add separators in the text (/, list) every time a part starts in uppercase. Ex: Opuntia microdays, Echinopsis zucc, Mammillaria elongata or Opuntia microdays / Echinopsis zucc / Mammillaria elongata or in list

Did you try to change space for / and then change the bars that are in the 1,3,5,7,9 position for spaces again?

1 Like

It’s a very good idea, but I don’t know how many species of plants you can give me back. So I don’t know how many spaces there can be. I also don’t know if the plant species that the Json returns have two words

1 Like

Post exactly how your json response look

Try something like this:

(of course set the list caps to all the capital letters of the alphabet, and I realise that not all your plants will start with “V” :wink: )

1 Like

Now I look at it and tell you :ok_hand: :ok_hand:

See also

2 Likes

What is the “contains any” block. Thought it was this:

text_split
but this block won’t let me harass you with the if

Thanks for the help! just as you said, it returns the result like this:

but it gets messy, I have to change to make it look like this Opuntia microdays / Echinopsis zucc / Mammillaria elongata. in order

Thanks again!! :grinning_face_with_smiling_eyes:

Oh, you do not have that extended really useful block in Kodular. Best to try the method by @dora_paz

1 Like

Is there any way to replace this block?

Not sure whether you are looking like this or not,

If so you can use this extension

The json returns it like this:

“results”: [
{
“score”: 99.52006530761719,
“species”: {
“scientificNameWithoutAuthor”: “Hibiscus rosa-sinensis”,
“scientificNameAuthorship”: “L.”,
“genus”: {
“scientificNameWithoutAuthor”: “Hibiscus”,
“scientificNameAuthorship”: “L.”
},
“family”: {
“scientificNameWithoutAuthor”: “Malvaceae”,
“scientificNameAuthorship”: “Juss.”
},
“commonNames”: [
“Chinese hibiscus”,
“Hawaiian hibiscus”,
“Hibiscus”
]
}
}

But when the photo matches more than one species, it returns them as shown in the photo

In the example json you get three common names and you can get them as a list with the following blocks. After that you can manipulate your list according to your needs

For example

2 Likes