Exemplo n.º 1
0
void RegExData::update()
{
   JM_GUARD_STACK
   strings.erase(strings.begin(), strings.end());
   positions.erase(positions.begin(), positions.end());
   if(t == type_pc)
   {
      for(unsigned int i = 0; i < m.size(); ++i)
      {
         strings[i] = JM_STD::string(m[i].first, m[i].second);
         positions[i] = m[i].matched ? m[i].first - pbase : -1;
      }
      line = m.line();
   }
   else
   {
      for(unsigned int i = 0; i < fm.size(); ++i)
      {
         strings[i] = to_string(fm[i].first, fm[i].second);
         positions[i] = fm[i].matched ? fm[i].first - fbase : -1;
      }
      line = fm.line();
   }
   t = type_copy;
}
Exemplo n.º 2
0
	int _group_pos_rgx_(cmatch& grp,int i){return grp.position(i);}//the starting position in the string of the match
Exemplo n.º 3
0
	int _group_length_rgx_(cmatch& grp,int i){return grp.length(i);}//the string length of selected match group
Exemplo n.º 4
0
	int _group_size_rgx_(cmatch& grp){return grp.size();}//return group size
Exemplo n.º 5
0
	bool _group_empty_rgx_(cmatch& grp){return grp.empty();}//check if group is empty
Exemplo n.º 6
0
	bool _group_ready_rgx_(cmatch& grp){return grp.ready();}//check if group has been initialized