I have 2 strings for exampe:

```
FO-123-4444-3353-9999-TEXT and
123-4444-3353-88888-something

```

How can i get substring without TEXT,something on the end and if there is FO also without FO. FO will be always there or won't , but TEXT can have any other word instead

Final result shoul be:

```
123-4444-3353-88888 and
123-4444-3353-9999

```