Here is an example... and the description of the table values:
# This script works from the name= xml property stored with each
# channel definition in an LOR file.
# repeat this pattern for each network you want to define:
# {'name': 'LeadingSubString,'net':num},
# you can list as many of those pairs between curly braces as you like
# each curly brace set needs to be seperated by a comma and the whole thing
# is within square brackets []
#
# name is a SUBSTRING, it does not need to match the entire name= value for a channel,
# the matches must agree on case, and for the entire length of the SUBSTRING value
# ('mega0' will match 'mega01 #1','mega01 #2','mega02 #1'... but will NOT match 'mega','mega10', etc.)
# network number is 0-based in xLights, so the first network should start with 0 (not quoted)
# even though xLights displays it as '1' in the network configuration
#
# NOTE: to make it easier to find channels with missing definitions,
# any channel without a matching name pattern is given a net="999" value.
# Search for the string 'net="999"' using an editor to find channels and
# then add them to the networks[] table below.
# to assign channel names, use the Configure Channel option in LSP.
# (This can be applied individually or by controller.)
#
# fyi: I now skip any lms file with 'new' at the start of the name to avoid reprocessing of the derived files
networks = [{'name':'mega0', 'net':0},
{'name':'mega10', 'net':0},
{'name':'mega11', 'net':0},
{'name':'mega12', 'net':0},
{'name':'mega13', 'net':0},
{'name':'mega14', 'net':0},
{'name':'mega15', 'net':1},
{'name':'mega16', 'net':1},
{'name':'mega17', 'net':1},
{'name':'mega18', 'net':1},
{'name':'mega19', 'net':1},
{'name':'mega20', 'net':1},
{'name':'mega21', 'net':1},
{'name':'mega22', 'net':1},
{'name':'mega23', 'net':1},
{'name':'mega24', 'net':1},
{'name':'mega25', 'net':1},
{'name':'mega26', 'net':1},
{'name':'mega27', 'net':1},
{'name':'mega28', 'net':1},
{'name':'mega29', 'net':2},
{'name':'mega3', 'net':2},
{'name':'mega4', 'net':2},
{'name':'corostar', 'net':1},
{'name':'Aether', 'net':3},
{'name':'Coro Top', 'net':3},
{'name':'Coro Bot', 'net':3},
{'name':'Front', 'net':4},
{'name':'Side', 'net':4},
{'name':'Back', 'net':4},
{'name':'Tree', 'net':4},
{'name':'Bush', 'net':4},
{'name':'Mega', 'net':4},
{'name':'Spike', 'net':4},
{'name':'Street', 'net':4},
{'name':'Penguin', 'net':4},
{'name':'Snow', 'net':4},
{'name':'Ridge', 'net':4},
{'name':'Spiral', 'net':4},
{'name':'Meteor', 'net':4},
{'name':'TBD', 'net':4},
{'name':'BigArch', 'net':5}]