> I'm trying to write an expression for coldspring's regex method pointcut > advisor. I'm trying to write a regular expression that is a white list of > methods that I do not want intercepted.
Can you supply a bit of context to what ColdSpring's method pointcut advisor is/does? Are you in control of the whole code, or just specifically the regex? (If the latter, is it a CF regex or a Java regex?) > So I don't want any discard|recycle|generate|frankGrimes methods intercepted. Do you want a regex that matches those values, and then excludes; or, a regex that matches everything except those methods and includes? Also, do you want an entire match or a partial match (i.e. does the "generate" indicate that "GenerateStrongPassword" should be matched or not matched?) > The current regular expression to handle the situation is > [^discard|recycle|generate|frankGrimes] That definitely wont work. Using [stuff] is a character set, and will match an *individual* character. Also, the bar/pipe has no special meaning within a character set. Using parentheses will work with regards to matching one of those four values, but does not do the negation: (discard|recycle|generate|frankGrimes) I don't want to write too much without knowing what it is you're after, so just one more quick note... <cfif refind( "\A(discard|recycle|generate|frankGrimes)\z" , method )> is effectively identical to <cfif ListFind( "discard,recycle,generate,frankGrimes" , method )> Of course the List function is more obvious/readable, and therefore the advised solution if possible. However, if you must supply a regex then the above might do what you want - depends what you actually need. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1181 Subscription: http://www.houseoffusion.com/groups/regex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
