You can do exactly what you want like so:
@Then("I can view files $somethingExtraneous")
public thenICanViewFiles() {
// etc
}$somethingExtraneous is the equiv of the real regex you wish for. Note that 'variables' mentioned in the annotation do not have to be used in the applicable method. - Paul
