Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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 .* ?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Apr 21, 2008 7:35 pm   
 
[%w']
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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 [ ]
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.' }
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net