fork download
  1. import re
  2.  
  3. str = "(f-dqcn-bus:1),(f-cdqc-bus:2)"
  4. businesses = re.findall(r"(?<=-)[^-)]+(?=\))", str)
  5. print(businesses)
  6.  
Success #stdin #stdout 0.03s 9512KB
stdin
Standard input is empty
stdout
['bus:1', 'bus:2']