How can I convert Perl regular expressions to boost regular expressions?
- by YY
I'm not familiar with Perl and boost regular expression and I want to convert a Perl code to c++.
I want to convert special regular expression in Perl into c++ using Boost regexp library.
Please help me understand what I must do?
Here is some regexps that a word of a sentence may match:
if ($word =~ /^[\.:\,()\'\`-]/) { # hack for punctuation
}
if ($word =~ /^[A-Z]/) {
return;
}
if ($word =~ /[A-Za-z0-9]+\-[A-Za-z0-9]+/) { # all hyphenated words
return;
}
if ($word =~ /.*[0-9].*/) { # all numbers
return;
}