From: Matthew Smillie Date: 2006-01-30T06:13:58+09:00 Subject: Re: Premature end of regular expression with non-ascii character > I'm trying to get regular expressions to work with a string that > contains letters with accents. I have the following sentence: > > De kin� weet ��n van hun pati�nten te overtuigen om gekke dingen te > doen. > > The regexp /pati�nten/ matches the word pati�nten. However when I > do the > regexp /kin�/, I get the error 'premature end of regular expression: > /kin�/ (SyntaxError)'. Can anybody tell me what is going on? Another > issue with the same sentence is, when I use the regexp /\s/ to > highlight > all the spaces, the space between 'kin� weet' is not highlighted as a > space. It seems like regular expressions cann't handle non-ascii > characters at the end of a string. I believe this is a character encoding problem which is fixed in 1.9 by the inclusion of a new regular expression engine (Which you can also download and use in 1.8): http://www.geocities.jp/kosako3/oniguruma/ Best of luck. matt.