common structure for String and RegExp