locked
Unicode regular expressions RRS feed

  • Question

  • Hi guys!

    I'm looking for regular expressions in VC for unicode strings.

    ansi works fine, but unicode?

    A sample:

    #include <regex>
    //...
    std::tr1::cmatch res;
    std::tr1::regex pattern("^(.{10});(.{24});(.+)$");//01/07/2009;SISPAG  ADECCO TOP SERV ;368,99
    std::tr1::regex_search(line.c_str(), res, pattern);


    There are some templates, functions for wide/unicode strings?

    Thanks


    Murilo Maciel Curti (Shinji) | SDET | Windows Brazil | http://shinji360.spaces.live.com | http://twitter.com/shinjiR

    Tuesday, October 20, 2009 7:14 PM

Answers

All replies

  • Try wregex and wcmatch.

    Tuesday, October 20, 2009 8:06 PM
  • Thanks!
    I was confuse with all the regex_search definitions.. the wide regex and cmatch solved the problem!
    Murilo Maciel Curti (Shinji) | SDET | Windows Brazil | http://shinji360.spaces.live.com | http://twitter.com/shinjiR
    Wednesday, October 21, 2009 10:49 AM