mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 06:08:21 +00:00
refactoring people import from folk.csv
This commit is contained in:
@@ -676,6 +676,18 @@ class LoadingSurvex:
|
||||
SO we have to recognise the '*fix' too
|
||||
"""
|
||||
# *fix|36|reference|36359.40|82216.08|2000.00\n
|
||||
# *fix|36|36359.40|82216.08|2000.00\n
|
||||
# Regex explanation:
|
||||
# (?i) # Case-insensitive matching
|
||||
# ^\s*[*]fix\s+ # Line starts with optional whitespace, then "*fix" followed by one or more spaces
|
||||
# ([\w\d_.\-]+) # Capture group 1: an identifier (alphanumeric, underscore, dot, or hyphen)
|
||||
# \s+ # One or more spaces
|
||||
# (?:reference)? # Optional literal word "reference" (non-capturing)
|
||||
# \s*([\d\.]*) # Capture group 2: optional number (digits and periods)
|
||||
# \s+([\d\.]*) # Capture group 3: another number (digits and periods)
|
||||
# \s+([\d\.]*) # Capture group 4: yet another number (digits and periods)
|
||||
# \s*;? # Optional whitespace and optional semicolon
|
||||
# (.*)$ # Capture group 5: remainder of the line (any characters), a comment
|
||||
rx_fixline = re.compile(r"(?i)^\s*[*]fix\s+([\w\d_\.\-]+)\s+(?:reference)?\s*([\d\.]*)\s+([\d\.]*)\s+([\d\.]*)\s*;?(.*)$")
|
||||
|
||||
line = line.replace("\n","")
|
||||
|
||||
Reference in New Issue
Block a user