From 00ac0647adb115cb60a0a02838fadc91f8b02c73 Mon Sep 17 00:00:00 2001 From: Sercan Altun Date: Tue, 30 Aug 2016 22:30:28 +0300 Subject: [PATCH] Fix Regex for character names with "." & "'" Old Regex expression did not capture Character names with "." and "'". As a result characters with names like "Mr. Jones" or "Ab'ar" were not registering correctly. I added . & ' characters into Regex. We may need to add some more characters in future. --- Assets/Fungus/Narrative/Scripts/ConversationManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Narrative/Scripts/ConversationManager.cs b/Assets/Fungus/Narrative/Scripts/ConversationManager.cs index 14610e15..07c41200 100644 --- a/Assets/Fungus/Narrative/Scripts/ConversationManager.cs +++ b/Assets/Fungus/Narrative/Scripts/ConversationManager.cs @@ -164,7 +164,7 @@ namespace Fungus { //find SimpleScript say strings with portrait options //You can test regex matches here: http://regexstorm.net/tester - var sayRegex = new Regex(@"((?[\w ""><]*):)?(?.*)\r*(\n|$)"); + var sayRegex = new Regex(@"((?[\w ""><.']*):)?(?.*)\r*(\n|$)"); MatchCollection sayMatches = sayRegex.Matches(conv); var items = new List(sayMatches.Count);