EDIT: There is a new feature in WCS that enabled to extract pattern-based entities - in other words, user is able to define entities based on regular expressions. More information in the DOC here:
https://console.bluemix.net/docs/services/conversation/entities.html#creating-entities [30.11.2017]
You can access the user input text by writing <? input.text ?>
then two methods supported by WCS might be useful:
<?input.text.matches('regexp')?>
return true if the input matches input regexp expression.
and
<?input.text.extract('regexp', 0)?>
(second parameter is regexp group number). That extracts part of the input String as specified by regexp and group.
For example this expression on a dialog node context:
"lastword" : "<?input.text.extract('\\w+$', 0)?>"
will extract the last word from the input text provided by user.
Note that this is not a perfect solution for your use case, so it might be a good idea to add a dialog flow that confirms whether the parsed string is really a user name...