English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

$boo = "Dog."
If I search for $boo in a string, does the dot become a metacharacter or just a normal dot character?

2007-11-21 18:30:19 · 1 answers · asked by splurkles 3 in Computers & Internet Programming & Design

Ok thanks... could I do a \Q$boo\E to make it's value a literal?

2007-11-21 19:53:28 · update #1

1 answers

Variables are expanded to be part of the regex string, therefore the dot will be treated as a meta character (ie a single wildcard character).

2007-11-21 18:50:57 · answer #1 · answered by oracle128au 7 · 0 0

fedest.com, questions and answers