Splitting a string dynamically

Welcome to Astronomy Club, Václav!
:dizzy::cowboy_hat_face::crescent_moon:

@cheesebird, do you have some sort of specification for the source data and the destination data? It’s extremely difficult to think with the separations and consolidations you’re needing. As I said over here, they just look like random textbook exercises.

For example, these aren’t actually equations. They’re parameters of some type, right?.

If you present your scenario like…

Here’s what I have:

string1 = "(FS22 > 15) && (FS22 < 46) || (FS33 > 0.0)"
string2 = "(FS33 > 0.0) || (FS34> 15) && (FS22 < 46) || (FS33 > 0.0)"
string3  = "(FS33 > 0.0) || (FS34> 15) && (FS22 < 46) || (FS33 > 0.0)  && (FS39> 15)"

Here’s what I need to turn it into:

FS22[15:46] ...

Because… <description of before and after data structure and some explanation of the elements in the strings>

Presenting the situation and its requirements in bits and pieces means there’s no endgame for anyone trying to help you. It just seems like random actions and shots in the dark toward some unknown end result.

To successfully automate a process, one must FIRST understand how to do the process manually.

4 Likes