
    Write a function to validate bus route codes where each valid code must contain a main terminal (represented by 'a') followed by one or more bus stops (each represented by 'b') in sequence. The route code validation is essential for maintaining consistent route patterns in the city's bus network management system.
    

    
import re

def text_match_one(text):
    """
    Write a function to validate bus route codes where each valid code must contain a main terminal (represented by 'a') followed by one or more bus stops (each represented by 'b') in sequence. The route code validation is essential for maintaining consistent route patterns in the city's bus network management system.
    

    """
import re

def text_match_one(text):
    """
    Write a function to validate bus route codes where each valid code must contain a main terminal (represented by 'a') followed by one or more bus stops (each represented by 'b') in sequence. The route code validation is essential for maintaining consistent route patterns in the city's bus network management system.
    

    """
    patterns = 'ab+?'
    if re.search(patterns, text):
        return True
    else:
        return False