Unverified Commit 994fceec authored by crazywoola's avatar crazywoola Committed by GitHub

fix: qa regex (#1738)

parent 8c451eb0
...@@ -632,8 +632,8 @@ class IndexingRunner: ...@@ -632,8 +632,8 @@ class IndexingRunner:
return text return text
def format_split_text(self, text): def format_split_text(self, text):
regex = r"Q\d+:\s*(.*?)\s*A\d+:\s*([\s\S]*?)(?=Q|$)" regex = r"Q\d+:\s*(.*?)\s*A\d+:\s*([\s\S]*?)(?=Q\d+:|$)"
matches = re.findall(regex, text, re.MULTILINE) matches = re.findall(regex, text, re.UNICODE)
return [ return [
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment