需要匹配的字符串如下:
#VRML V2.0 utf8
# Generated by VCGLIB, (C)Copyright 1999-2001 VCG, IEI-CNR
NavigationInfo {
type [ "EXAMINE", "ANY" ]
}
DEF Box01 Transform {
scale 1 1 1
translation 0 0 0
children
[
Shape
{
geometry IndexedFaceSet
{
creaseAngle .5
solid FALSE
coord Coordinate
{
point
[
948.701 665.378 288.971, 948.204 665.874 259.231, 948.699 671.327 289.469, 948.203 671.32 259.229
]
}
color Color
{
color
[
0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961
]
}
coordIndex
[
9,13,3,-1, 3,1,9,-1, 16,18,22,-1, 22,20,16,-1, 0,11,19,-1, 19,4,0,-1
]
}
appearance Appearance
{
material Material
{
ambientIntensity 0.2
diffuseColor 0.9 0.9 0.9
specularColor .1 .1 .1
shininess .5
}
}
}
]
}
DEF Box02 Transform {
scale 1 1 1
translation 0 0 0
children
[
Shape
{
geometry IndexedFaceSet
{
creaseAngle .5
solid FALSE
coord Coordinate
{
point
[
948.701 665.378 288.971, 948.204 665.874 259.231, 948.699 671.327 289.469, 948.203 671.32 259.229
]
}
color Color
{
color
[
0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961
]
}
coordIndex
[
9,13,3,-1, 3,1,9,-1, 16,18,22,-1, 22,20,16,-1, 0,11,19,-1, 19,4,0,-1
]
}
appearance Appearance
{
material Material
{
ambientIntensity 0.2
diffuseColor 0.9 0.9 0.9
specularColor .1 .1 .1
shininess .5
}
}
}
]
}
DEF Box03 Transform {
scale 1 1 1
translation 0 0 0
children
[
Shape
{
geometry IndexedFaceSet
{
creaseAngle .5
solid FALSE
coord Coordinate
{
point
[
948.701 665.378 288.971, 948.204 665.874 259.231, 948.699 671.327 289.469, 948.203 671.32 259.229
]
}
color Color
{
color
[
0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961, 0.690196 0.345098 0.101961
]
}
coordIndex
[
9,13,3,-1, 3,1,9,-1, 16,18,22,-1, 22,20,16,-1, 0,11,19,-1, 19,4,0,-1
]
}
appearance Appearance
{
material Material
{
ambientIntensity 0.2
diffuseColor 0.9 0.9 0.9
specularColor .1 .1 .1
shininess .5
}
}
}
]
}写一个正则表达式获取所有的 Transform节点和Transform节点中的全部内容
Transform {
scale 1 1 1
translation 0 0 0
children
[
.................
]
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4547/viewspace-3155535/ ,如需转载,请注明出处,否则将追究法律责任。