Regular Expressions
Use these options to customize the regular expression that identifies fields that you want to import, and their field order, and units. The options are available in the fifth dialog of the Import Format Editor. To learn more about how to write and modify regular expressions, see Reference: Regular Expressions.
Options |
|
Regular expression |
When you click Reset (below), this box shows the regular expression created by the fields you added in the previous Fields dialog. You can manually edit the expression by:
|
Reset |
Click this to update the regular expression box with the fields you added in the previous Fields dialog. |
Regular Expression Example |
|
If your data looked like this: Point "783721",1.020504836526262,2.350757695493461e-001,161.924222568444750,"104",, |
|
You would select these fields in the Fields dialog: Point ID, Northing, Easting, Elevation, and Feature Code |
|
After clicking Reset in the Regular expression dialog, the expression would be started: ^(?<PointId0>)(?<Northing1>)(?<Easting2>)(?<Elevation3>)(?<FieldCode4>) |
|
You would need to finish the expression by adding these to match the data: ^\s*Point\s"(?<PointId0>[\-+\s\w]+)",(?<Northing1>[0-9.e]+),(?<Easting2>[0-9.e\-]+), |
|
Here are the reasons to add each operator and character to the syntax: |
|
\s*Point\s" |
\s* matches zero or more white spaces at the beginning of the line; Point matches the word identifying the next value as a point ID; \s matches a single white space; the open and closed " match the quote marks around the point ID group |
[\-+\s\w]+ |
the brackets [ ] specify to match any character identified within them; \-+ matches either the positive or negative sign in front of the point ID and \w matches any alphanumeric character for the point ID; + outside the brackets repeats the matching to account for any combination of the allowed characters |
, |
, specifies that a new field follows |
[0-9.e\-]+ |
0-9 matches any numerals for the northing, easting, and elevation in the 0-9 range; .e\- matches any decimal, e or minus sign encountered in the value |
[^"]* |
^" matches any string for the feature code until the next " is encountered; * matches any characters after that |
Keywords to use for imported data fields
Value you are specifying |
Keyword to use |
easting |
Easting |
elevation |
Elevation |
ellipsoidal height (local or global) |
EllipsoidalHeight |
feature code |
FieldCode |
latitude (local or global) |
Latitude |
longitude (local or global) |
Longitude |
northing |
Northing |
point ID |
PointId |
X (ECEF) |
XECEF |
Y (ECEF) |
YECEF |
Z (ECEF) |
ZECEF |