Hi Dan, bad luck, I can't make any of these four "u or U" work right:

=======================================
$pat = "/^(.*\b$term\b.*)$/imu";
return BOLTescape(preg_replace("/\b$term\b/iu", $fmt, $matches));
=======================================
$pat = "/^(.*\b$term\b.*)$/imu";
return BOLTescape(preg_replace("/\b$term\b/iU", $fmt, $matches));
=======================================
$pat = "/^(.*\b$term\b.*)$/imU";
return BOLTescape(preg_replace("/\b$term\b/iU", $fmt, $matches));
=======================================
$pat = "/^(.*\b$term\b.*)$/imU";
return BOLTescape(preg_replace("/\b$term\b/iu", $fmt, $matches));
=======================================

Would you mind using the form below to search a tern, say, "count" to
test?

[form]
[text query size=40] [submit SEARCH]
[session nextpage {p}]
[session search "text='{=query}' template=highlight words=false"]
[session msg]
[form]

[results]

If you search 'count', it can find all of the results of 'count',
'counter', 'account' and so on. But only the results containing
'count' can output correctly, others output an empty <li>.

Cheers,
linly


On Aug 26, 5:31 pm, "The Editor" <[EMAIL PROTECTED]> wrote:
> Hmmm.
>
> Looks like there is another regex pattern in the highlight.php
> function. Line 16. Try adding a u/U to it also.  Maybe that will do
> the trick.
>
>     return BOLTescape(preg_replace("/\b$term\b/i( u or U here )",
> $fmt, $matches));
>
> Keep me posted. Sorry I don't have more time to work on this myself.
>
> Cheers,
> Dan
>
> 2008/8/25 Linly <[EMAIL PROTECTED]>:
>
>
>
> > Sorry Dan, not working. All of them
>
> >  $pat = "/^(.*\b$term\b.*)$/im"; or
> >  $pat = "/^(.*\b$term\b.*)$/imu"; or
> >  $pat = "/^(.*\b$term\b.*)$/imU";
>
> > Results the same. :(
>
> > The problem is happened in output, not in searching. Searching is ok,
> > it can only output exactly matched terns, other partly matched, it
> > does find but output an empty <li>.
>
> > cheers,
> > linly
> > PS: If I reply late, it might be because I'm at east Asia. 12-13 hours
> > earlier, or late, than U.S.. :)
>
> > On 8月26日, 上午2時25分, "The Editor" <[EMAIL PROTECTED]> wrote:
> >> Try editing line 13 of highlight.php (in your plugin folder) to add a
> >> u like this
>
> >>         $pat = "/^(.*\b$term\b.*)$/imu";
>
> >> It might also be a capital U, not sure. This allows UTF-8 matches. If
> >> it works, let me know and I'll add it to the plugin.
>
> >> Cheers,
> >> Dan
>
> >> 2008/8/24 Linly <[EMAIL PROTECTED]>:
>
> >> > Hi Dan, Sorry to rise this post again. Do you think this small bug
> >> > worth to solve? It's important for east Asia languages. Chinese,
> >> > Japanese, Koren ...
>
> >> > Cheers,
> >> > linly
>
> >> > On 8月19日, 下午2時44分, Linly <[EMAIL PROTECTED]> wrote:
> >> >> > Looks like a utf-8 problem in the plugin.
>
> >> >> Sorry it should be the 'words=false' parameter problem because
> >> >> searching is ok but output is unnormal.
>
> >> >> Btw, since the new [(include)] algorithm can specify certain line(s)
> >> >> to grab, how about using it into [(highlight)] syntax?
>
> >> >> > [(highlight "$text" page={+p} lines=1)] or something like that.
>
> >> >> Cheers,
> >> >> linly
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to