AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How to match exclamation marks?
 
 

Bear with me if this is too basic. But in case I need to match exclamation marks like in “Great! I like it.”, the canonical form in the :testpattern screen shot attached says no match. Where did I do wrong?

Thanks.

Image Attachments
cs_exclam.png
 

 
  [ # 1 ]

Actually, it’s a CS bug.  It is SUPPOSED to be the case that ! would terminate a sentence, just like .  . But it wasn’t marked internally properly.  What you should be seeing is two sentences. The first is:
Great
The second is:
I like it

In both cases, the terminal punctuation is swallowed into the tokenflags, and then you could match the exclamation by
u: (great \!) 
where the location of \! doesnt matter, because its actually a flag, not a positional token.  Next CS this weekend will fix this.

Now there remains an issue if you set tokencontrol to prevent ! being a terminator. Then you have no way to match it. I will figure that out too.

 

 
  [ # 2 ]

Fixed in now released 5.72b

 

 
  login or register to react