public String ex_string(String buff, int item, String sep) {
		String result = null;
		int ptr1 =  0;
		int ptr2 = 0;
		int cpt = 0;
		int next = 0;
		if ( item > 1)
			while ( cpt < item -1) {
				ptr1 = buff.indexOf(sep, next);	//search the tag preceeding area
				cpt++;
				next = ptr1+1;
			}
		else
			ptr1 = 0;	//1st item requested : point on buffer begin
		
		if(ptr1 == 0)
			ptr2 = buff.indexOf(sep);	    //search the 1st tag following array
		else
			ptr2 = buff.indexOf(sep, ptr1 + sep.length());	    //search the 2nd tag following array
		if((ptr1 < (buff.length() - sep.length())) && (ptr1 >= 0)) {
			//previous tag found
			if(ptr1 > 0)
				ptr1 += sep.length();	//skip the separator itself
			//1st sep found
			if( (ptr2 < (buff.length() - sep.length())) && (ptr2 > ptr1) ) { 
				//2nd found, too !
				if( (ptr2 - 1) == ptr1 ) {
					/*
					//empty result
					result = "";
					*/
					// single digit
					result = buff.substring(ptr1, ptr2);
				} else {
					result=buff.substring(ptr1, ptr2);
				}
			} else {
				//2nd not found : take the rest of line
				result = buff.substring(ptr1, buff.length());
			}
			
		} else {
			//no separator found : return empty string !
			result = "";
		}
		
		return result;
	}