What regex can take any of the lines below as input
rtsp://server/blabla/bla RTSP/1.0
rtsp://server/blabla/bla/
rtsp://server/blabla/bla
rtsp://server/blabla/bla/streamid=65335 RTSP/1.0
and always returns:
rtsp://server/blabla/bla
In general I have an arbitrary URL which always starts with "rtsp://"
and optionally ends with EOL
, "/"
, " RTSP/1.0"
or "/streamid=65335 RTSP/1.0"
.
I need to get the URL only i.e. without the optional trailing parts.
Thanks.