Code: Select all
$v = 'foobar';
// Most characters can be concatenated with the variable, e.g.:
$withHashAtBeginning = "#$v";
msg "Hash at beginning: $withHashAtBeginning";
$withFullStopAtBeginning = ".$v";
msg "Full stop at beginning: $withFullStopAtBeginning";
$withQuestionMarkAtBeginning = "?$v";
msg "Question mark at beginning: $withQuestionMarkAtBeginning";
// However, there seems to be an issue with the * wildcard character but only at the beginning:
$withWildcardAtBeginning = "*$v";
$withWildcardAtEnd = "$v*";
msg "Wildcard at end: $withWildcardAtEnd";
msg "Wildcard missing at beginning: $withWildcardAtBeginning", 48;
// There is a workaround:
$withWildcardAtBeginning = '*' . $v;
msg "Wildcard at beginning using workaround: $withWildcardAtBeginning";
XYplorer Beta Club