in reply to Re^2: converting smart quotes
in thread converting smart quotes
My bad. Didn't find it because I didn't look closely enough... and when I used 'find' I used a common, straight single quote instead of a smartquote for the symbol. Duh! So, my apologies for that.
The regex is using a "character class" to match any single instance of a character in the range \x00 through \x08 or \x0c, \x0e through </c>\x1f</c> or ...
... well, at that point, I'm thoroughly puzzled. The curly bracket notation in the last element is usually used to specify ('quantify') the number of instances of a preceeding character, but in this case, my first guess would be that it's a typo. Wiser heads may have another intepretation. I don't understand and haven't found an explanation, yet for the use of {}s around the \x{1FFFFF})
As for learning more about regexen, see perlrequick, perlretut, and the invaluable "Mastering Regular Expressions" by Friedl (ca USD 30, last I looked). The book is where I'll look first to try to understand the use of curly brackets as something other than a mistake.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: converting smart quotes
by tobyink (Canon) on Mar 20, 2012 at 13:14 UTC | |
by slugger415 (Monk) on Mar 20, 2012 at 14:49 UTC | |
by slugger415 (Monk) on Mar 20, 2012 at 14:30 UTC | |
by tobyink (Canon) on Mar 20, 2012 at 15:27 UTC |