|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: Wed Aug 11, 2004 12:57 am
%match help |
What do i need to do to get this to work?
I want to match with the %match function: H:2668 M:2720 E:12240 W:13200 [eb]
#say %match( "H:2668 M:2720 E:12240 W:13200 [eb]", "H:%d M:%d E:%d W:%d ~[eb]")
output: 0
#say %match( "%quote("H:2668 M:2720 E:12240 W:13200 [eb]")", "H:%d M:%d E:%d W:%d ~[eb]")
output: 0 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Aug 11, 2004 3:53 am |
#SAY %match( H:2668 M:2720 E:12240 W:13200 [eb], H:%d M:%d E:%d W:%d ~[eb~])
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: Wed Aug 11, 2004 11:55 am |
thanks LightBulb...I thought it was like %regex
|
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: Wed Aug 11, 2004 1:14 pm |
ok so i tried to modify it a bit and it gave me a zero
#SAY %match( H:2668 M:2720 E:12240 W:13200 [eb], H:%d M:%d E:%d W:%d ~[*~]) <-- want a wild card in there... |
|
|
|
SCORNME Novice
Joined: 25 Jul 2004 Posts: 48 Location: aka Falan
|
Posted: Thu Aug 12, 2004 5:38 am |
I think I remember reading somewhere that the * wildcard also matches the following space too. If it is grabbing the end brace would that be throwing off the pattern? If the letters between the braces [] don't have any spaces you could try %w. Did you play with the pattern match checker in the Editor Window?
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Aug 13, 2004 4:31 pm |
Why don't you just use your pattern as a trigger pattern? That will save you all the headaches of trying to make it work %match.
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
|
|