 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Dec 13, 2008 1:55 am
[3.03] long regex patterns being seen as copies in package editor |
Have four similar regex triggers
^\= S(\d+|\-\-|\+\+)\@h(\d+|\+\+)\,H(\d+|\+\+)\,CE(\d+)\%\,W\<-(\w+)\@(\d+)kts\,C\/S-\>(\w+)\@(\d+)\,(\w+)$
^\= S(\d+|\-\-|\+\+)\@h(\d+|\+\+)\,H(\d+|\+\+)\,CE(\d+)\%\,W\<-(\w+)\@(\d+)kts\,C\/S-\>(\w+)\@(\d+)\,(\w+)\,[(\w+|\w+\+\w+)]\,T\-\>(\w+)$
^\= S(\d+|\-\-|\+\+)\@h(\d+|\+\+)\,H(\d+|\+\+)\,CE(\d+)\%\,W\<-(\w+)\@(\d+)kts\,C\/S-\>(\w+)\@(\d+)\,(\w+)\,T\-\>(\w+)$
^\= S(\d+|\-\-|\+\+)\@h(\d+|\+\+)\,H(\d+|\+\+)\,CE(\d+)\%\,W\<-(\w+)\@(\d+)kts\,C\/S-\>(\w+)\@(\d+)\,(\w+)\,[(\w+|\w+\+\w+)]$
Whenever I try to make any change to them (ie adding the $ at the end to attempt to better match, also trying to change what the trigger does), I get a popup for it being a copy of another trigger. I've checked and there are no other copies of these triggers besides the four above. It makes it through all of them until the parenthesis after the capital W near the middle of the trigger.
I know these can be optimized a little bit, but wanted to bring this up. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Dec 13, 2008 3:12 am |
This is normal and has been reported before. CMUD can only index the first 64 characters of a trigger pattern (a restriction of the SQLite database). You need to assign a unique IDName to each trigger so that CMUD can tell that they are not the same.
|
|
|
|
 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Dec 13, 2008 3:23 am |
Thanks!
|
|
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Dec 13, 2008 3:55 pm |
As an aside Dumas you may consider combining them into one trigger and doing a %regex in the code for the variable bits. Of course that's just my preference I prefer to have fewer triggers.
|
|
_________________ Asati di tempari! |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Sun Dec 14, 2008 10:55 pm |
Many of the characters you have marked with a backslash have no special meaning. I am guessing that the [] actually occur in the line you are trying to match so that do need to be tagged with backslashes. Finally you can make it all one trigger using 2 optional clauses.
| Code: |
| ^= S(\d+|--|\+\+)\@h(\d+|\+\+),H(\d+|\+\+),CE(\d+)%,W<-(\w+)\@(\d+)kts,C/S->(\w+)\@(\d+),(\w+)(?:,\[(\w+|\w+\+\w+)\])?(?:,T->(\w+))?$ |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Mon Dec 15, 2008 10:12 am |
Thanks guys, and I also found that you can use \++ as it reads this as "find one or more +".
|
|
|
|
 |
|
|
|
|
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
|
|