string source = ".....";
regex re("....");
//
regex_iterator<string::iterator> rit(source.begin(), source.end(), re);
regex_iterator<string::iterator> rend;
//
while (rit != rend) {
if (<условие1>) {
rit++;
}
}
rit(source.begin(), source.end(), re);
rit(source.begin(), source.end(), re);
// Создаем контейнер
RelativeLayout container = new RelativeLayout(activity);
activity.addContentView(container, new ViewGroup.LayoutParams(-1, -1));
//
// размещаем свою вьюшку на нем
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(-2, -2);
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, -1);
container.addView(banner, params);
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"
android:id="@+id/my_view_id">
</RelativeLayout>