Arabic regex matching – c++

  arabic-support, c++, regex

I need to find the given string has arabic letters. It ranges from u0600-u06FFu0750-u077F.
What is wrong with the below program:


std::vector<STD_STRING> strFieldvalues;

 std::string pattern = "/[u0600-u06FFu0750-u077F]/";

std:string strFieldVal;

gboolArabic = false;

int i = 0;

int j = 0;

for ( ;i < fieldValues.size() && j< fieldNames.size(); i++,j++) //for loop its entering

{

strFieldVal=fieldValues[i].GetPString();

if (std::regex_match(strFieldVal, std::regex("(sub)(/[u0600-u06FFu0750-u077F]/)")))
{
gboolArabic = true;
gArabicFieldNames.push_back(fieldNames[j].GetPString());

}

strFieldVal is coming as <0067><062A><0627>. But its not entering into the if block.
Can anyone help .

Source: Windows Questions C++

LEAVE A COMMENT