Initial commit - fix problems & refactor code
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from core.environment import IGNORE, MEANINGFUL
|
||||
import re
|
||||
|
||||
def findPrefix(s: str, separators: str = IGNORE + MEANINGFUL) -> str:
|
||||
pattern = rf'^[^{separators}]*'
|
||||
match = re.match(pattern, s)
|
||||
if match:
|
||||
return match.group(0)
|
||||
return ''
|
||||
Reference in New Issue
Block a user