How to exclude version info from 'name of operating system'?

(imported topic written by Trailsuender)

Source:

Q: name of operating system

A: Linux Red Hat Enterprise Server 5.4

T: 45

How can I get rid of “5.4”?

This is what I need

Target:

A: Linux Red Hat Enterprise Server

For any help many thanks in advance!

(imported comment written by Trailsuender)

OK, after many tries and guesses I found:

Q: substrings separated by ((version of operating system) as string) of (name of operating system)
A: Linux Red Hat Enterprise Server
A:
T: 137

Please, can someone tell me how to remove the second empty “A:”?

I only need the first line and must avoid multiple results.

Many thanks in advance!

(imported comment written by Trailsuender)

OK, it can be done with “whose”:

Q: (substrings separated by ((version of operating system) as string) of (name of operating system)) whose (it contains “Linux”)
A: Linux Red Hat Enterprise Server
T: 119

Or better:

Q: (substrings separated by ((version of operating system) as string) of (name of operating system)) whose (it is greater than " ")
A: Linux Red Hat Enterprise Server
T: 141

Live Long and Prosper! :slight_smile:

(imported comment written by jgstew)

I do like this solution that you came up with by the way, it could be more dynamic and useful in other situations than my suggestion:

(substrings separated by ((version of operating system) as string) of (name of operating system)) whose (it is greater than " ")

(imported comment written by jgstew)

preceding text of last " " of “Linux Red Hat Enterprise Server 5.4”

preceding text of last " " of (name of operating system)