Regex too Capture certain words at start of string Ruby
|Added at||2017-01-02 08:01|
Looking for help in writing a regex for capturing whether a particular string starts with certain strings and capture the start and remaining string. E.g Let's say the possible starts of strings are 'P', 'RO', 'RPX' and the sample string is 'PIXR' or 'ROXP' or 'RPX'. I am looking to write a regex which captures the start and trailing part of string if it starts with the given possible strings e.g 'PIXRT' =~ // outputs 'P' and 'IXRT'
Not very conversant with regexes so any help is really appreciated.