|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Mon Apr 21, 2008 7:30 pm
Checking for an apostraphe |
So, back when I was talking about my tells triggers, someone mentioned something about people who had names with a lovely '
However, I can't find that post. More and more I'm finding that my triggers are failing when they don't check.
C'lor tells you
wont get capture or ding
nor will
Roerik's
I could use a greedy modifier, but the other person made it sound like I didn't have to. So how can I check for them without the .* ? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Apr 21, 2008 7:35 pm |
[%w']
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Apr 22, 2008 12:05 am |
where do I insert that?
I usually use the regex, \w+
so... here's the tell capture...
^(\w+') tells you (?:\((\w+)\) )?'(.*)'$
put it in like that? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Apr 22, 2008 12:25 am |
You have at least read one of the many links that has been provided as a regex reference, right?! This pattern should do it.
Code: |
^([\w']+) tells you (?:\((\w+)\) )?'(.*)'$ |
Perhaps it would be a good idea for you to save one of those links as a favorite. Try looking at it for the answers and if you don't understand then ask.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Apr 22, 2008 4:36 am |
I have them linked, but as someone had already answered before and I simply couldn't find it, I was already on the board and posted.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Apr 22, 2008 10:31 pm |
Took what you suggested:
Code: |
#REGEX Ding_on_Tell {^([\w'+]) tells you (?:\((\w+)\) )?'(.*)'$}
{
#play C:\WINDOWS\Media\ding.wav
} {General Triggers}
#REGEX "Tell Capture" {^([\w'+]) tells you (?:\((\w+)\) )?'(.*)'$} {#CAP Tells} {General Captures}
#REGEX You_Tell {^You tell [\w'+] (?:\((\w+)\) )?'(.*)'$} {#CAP Tells} {General Captures}
#REGEX G_Tell {^[\w'+] tells the group '.*'$} {#CAP Tells} {General Triggers}
|
<1045/1045hp 583/583m 340/340mv 32444tnl 80pq 159/362w 91g/602s
[On A Bridge] [NS] 4:00pm [Day Time] [Elvish]>
reply ooc: test
You tell C'lor (Elvish) 'ooc: test'
<1045/1045hp 583/583m 340/340mv 32444tnl 80pq 159/362w 91g/602s
[On A Bridge] [NS] 4:00pm [Day Time] [Elvish]>
C'lor tells you (Elvish) 'ooc: Fail.'
<1045/1045hp 583/583m 340/340mv 32444tnl 80pq 159/362w 91g/602s
[On A Bridge] [NS] 4:00pm [Day Time] [Elvish]>
reply ooc: damn
You tell C'lor (Elvish) 'ooc: damn'
Was never captured. (He said fail because I've tested him with many attempts at this and he knows I've failed em all so he expects I'll fail)
I also tried without [ ] |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Apr 22, 2008 11:05 pm |
You really need to pay attention, chamenas. So many of the problems you're having are caused by your making small typos or mistakes, or not reading what people have written carefully. The + goes after the ], not before it.
Also, you don't need to get him to send you a live tell to test it:
#say {C'lor tells you (Elvish) 'ooc: Fail.' } |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Apr 22, 2008 11:06 pm |
Oh cripes! Yes, well I tend to do things in a rush. Trying to do a million things at once is bad.
|
|
|
|
|
|