Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Sun Sep 29, 2002 1:54 am |
If you only have letters and spaces in the sentences and they all end with periods, a pattern of ^([a-z].) should work. If, however, your sentences sometimes have punctuation in them or end in things other than periods (like exclamation points or question marks), you'll need something more robust like:
^([a-z ()~~`@#$%^&*-_+={}[~]|:;"'<>,/]{.|?|!})
Both of these methods result in the first sentence being in %1 where you can do whatever you want with it.
Another solution is to pull in the first line regardless and then use %pos and %left to get only the part up to the first period. Like:
#TRIGGER {^(*)$} {#VAR FirstSentence %left("%1", %pos("%1", "."))}
For more information on pattern matching, go here.
- Charbal |
|