I would do it like this:
Button: On clicked
-- TextBox_input: Text is NOT "" (case insensitive) <----- Check if the user has written something in the input textbox
-- tokenat(TextBox_input.Text, 0, " ") = "/pm" <-----Check if the first token index (0) in the TextBox_input.Text is "/pm"
-----> TextBox_output: Set text to mid(TextBox_in.Text, len(tokenat(TextBox_in.Text, 0, " ")), (len(TextBox_in.Text)-len(tokenat(TextBox_in.Text, 0, " "))))
The action "TextBox_output: Set text..." just sets the text in the output to all characters that come after the "/pm".
I hope this helps!