I'm currently trying to make a text message command server (basically, I send a text to google voice, that gets forwarded to my email, I use a python IMAP library to access the message, and I parse it), and I have an interesting problem. Sometimes, when a text comes through, the string 

```
--
Sent using SMS-to-email. Reply to this email to text the sender back and save on SMS fees.
https://www.google.com/voice/

```

is appended to the text message, which causes errors when parsing the command. Right now, to detect commands, I use the following regex (which is multiline and case-sensitive due to certain commands such as a timed send command that may use multiple lines):

```
^/(randomfact) *(\S*)\s*$

```

But since the string telling me it was sent through SMS to email comes through once in a while, a match doesn't get detected. Using the `print` function of python, the message is shown as follows:

```
/randomfact\r\n\r\n--\r\nSent using SMS-to-email. Reply to this email to text the sender back and  \r\nsave on SMS fees.\r\nhttps://www.google.com/voice/

```

Right now, to combat that issue, I have tried doing this:

```
^/(randomfact)\s*(\d*)(?=\n\n--\nSent using SMS-to-email\. Reply to this email to text the sender back and save on SMS fees\.\nhttps://www\.google\.com/voice/)

```

But it only works if the string IS appended to the command. If it isn't, then the regex fails. My question is: Is there any way to exclude that string from any regex matches, whether it exists in the string or not?