Skip to content
Back to formatted view

Raw Message

Message-ID: <F649E9A1-B354-4178-8FF8-E97BE6C4C135@gmail.com>
Date: 2012-08-06T05:55:50Z
From: Luca Meyer
Subject: regexpr with accents

Hello,

I have build a syntax to find out if a given substring is included in a larger string that works like this:

d1$V1[regexpr("some text = 9",d1$V2)>0] <- 9

and this works all right till "some text" contains standard ASCII set. However, it does not work when accents are included as the following:

d1$V1[regexpr("some t?xt = 9",d1$V2)>0] <- 9

I have tried to substitute "?" with several wildcards but it did not work, can anyone suggest how to have the syntax parse the string ignoring the accent?

Thank you in advance,

Luca