bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

match() problem


From: KIMURA Koichi
Subject: match() problem
Date: Fri, 04 Apr 2003 11:57:53 +0900

Hi, 

I use gawk 3.1.2.
It seems problem at match() function when use multi-byte character.

Sample program is here:

gawk 'BEGIN {
  str = "XXYYZZ" # The fact is, X, Y, Z are multi-byte char.
  match(str, /X+Y+Z/)
  print RSTART,RLENGTH

  str = "aabbccddee"
  match(str, /a+b+c/)
  print RSTART,RLENGTH
}'

Result is:
0 -1
1 5

When used multi-byte character, match() failed.
Of course, multi-byte character support was enabled.

-- 

  KIMURA Koichi 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]