Lua code help (stuf text)
View Single Post
05-27-13, 02:32 PM
A Pyroguard Emberseer
Join Date: Mar 2006
string.gsub("Echo of a Pandaren Monk", "(%S[\128-191]*)%S+%s", "%1. ")
That pattern doesn't require one or more non-whitespace
. It requires one or more non-whitespace
(eg. \32 is flagged as "whitespace"). In the case of multi-byte characters, the extra bytes per character are matched. In the case of \208\176, neither \208 nor \176 by themselves are "whitespace" so string.gsub sees them as separate non-whitespace entities, since it is not Unicode-aware.
As for your other question, "Echo of a Pandaren Monk" [url="http://ru.wowhead.com/npc=58669"]in Russian[/b] is "Эхо пандарена-монаха". The preposition "of" is generally not used directly in Russian (the declension of the relevant noun changes instead) and articles like "a" and "the" are generally omitted. There are one-character words in Russian that are used often -- в, с, к, у are several that spring to mind -- but I don't know if any of them appear in NPC names.
A quick scan of Wowhead in Russian finds at least one NPC name with a single-character word --
Эрунак Говорящий с Камнем
. There are likely more, but I quit looking after spotting the first one on page 2.
Troubleshoot an addon
Turn any code into an addon
More addon resources
Need help with your code?
code! Attach or
Please don’t PM me
about addon bugs or code questions. Post a comment or forum thread instead!
Last edited by Phanx : 05-27-13 at
View Public Profile
Send a private message to Phanx
Find More Posts by Phanx