-
-
Save chuongmep/a8674dfefc9f5fe49ff03f9e54f8e698 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def tolist(obj1): | |
if hasattr(obj1,'__iter__') : return obj1 | |
else : return [obj1] | |
result = [] | |
#Preparing input from dynamo to revit | |
items = tolist(IN[0]) | |
for item in items: | |
result.append(re.sub(r" ?\([^)]+\)", "", item)) | |
OUT = result | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://chuongmep.com/Trim-White-Space-Regular-Expression