Take a look at
http://www.mushclient.com/regexp
Also, inside the trigger, once you have checked "regular expression" and click on the "..." box to edit the match text, there is a new button (marked "->") which lets you insert regular expression fields easily.
To get started, take your original trigger, which is:
You get * gold coins from the corpse of *.
Then click on the button "Convert to regular expression". This changes it to:
^You get (.*?) gold coins from the corpse of (.*?)\.$
You can see most is the same, except the wildcards are now: (.*?)
In a regular expression, something inside brackets is a "capture" (what we call a wildcard). So, the first capture becomes %1, the second %2, and so on, just like in a normal trigger.
In fact, internally MUSHclient converts all non-regular expression triggers to regular expressions using exactly that method, so it behaves exactly the same.
The dot character means "match anything", unless escaped by a backslash. So the final dot in your original text needs to be literally a dot, so it is there as: \.
The ^ means "anchor to start of the line", and the $ means "anchor to the end of the line". This stops it matching something like:
John says, "You get 20 gold coins from the corpse of the kobold."
Having got this far, let's see what Shaun Biggs suggested. Taking your converted regular expression:
^You get (.*?) gold coins from the corpse of (.*?)\.$
He suggested making it more specific. The regular expression documentation shows that you can match on digits only by using \d.
Also, the "*" character means "zero or more", but we really expect at least one digit, so "+" is used instead, which means "one or more".
Thus the simple change to:
^You get (\d+) gold coins from the corpse of (.*?)\.$
This makes sure that inside wildcard %1 will only be digits - and therefore the text "12 silver coins and" will not match it.
Another way of doing the same thing is with a character class, like this:
^You get ([0-9]+) gold coins from the corpse of (.*?)\.$
Here you are explicitly saying you only want 0-9 (the square brackets let you designate sets of exact characters or ranges).
You could also limit the number of digits, like this:
^You get ([0-9]{1,4}) gold coins from the corpse of (.*?)\.$
Now we are saying we only want between 1 and 4 digits (so a 5-digit number would not match).