diff --git a/openbb_terminal/stocks/screener/screener_controller.py b/openbb_terminal/stocks/screener/screener_controller.py index 83adec0a975f..7fd9359a61f4 100644 --- a/openbb_terminal/stocks/screener/screener_controller.py +++ b/openbb_terminal/stocks/screener/screener_controller.py @@ -92,7 +92,10 @@ def parse_input(self, an_input: str) -> List: See `BaseController.parse_input()` for details. """ # Filtering out sorting parameters with forward slashes like P/E - sort_filter = r"((\ -s |\ --sort ).*?(P\/E|Fwd P\/E|P\/S|P\/B|P\/C|P\/FCF)*)" + f0 = r"(p\/e|fwd p\/e|p\/s|p\/b|p\/c|p\/fcf)" + f1 = r"(P\/E|Fwd P\/E|P\/S|P\/B|P\/C|P\/FCF)" + + sort_filter = r"((\ -s |\ --sort ).*?" + r"(" + f0 + r"|" + f1 + r")" + r"*)" custom_filters = [sort_filter]