i figured this one out.

for some reason the ] didnt need to be escaped after the ^. So this worked:

<@REGEX EXPR='\[[^]]+\]' STR='@@local$text' TYPE=E>

----- Original Message ----- 
From: "Alan Wolfe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 11, 2004 12:18 PM
Subject: Witango-Talk: regex


> hey everyone
> 
> im trying to do a regex expression that looks for text in [ ] brackets.
> 
> so if i had this text:
> 
> "[text here] [text here too]"
> 
> that it would find [text here] first.
> 
> so far i have this:
> 
> <@REGEX EXPR="\[[^\]]+\]" STR="@@local$text" TYPE=E>
> 
> i was trying to escape the [ and ] with \[ and \] but the above says no
> match, but if i do this regex:
> 
> <@REGEX EXPR="\[.+\]" STR="@@local$text" TYPE=E>
> 
> it returns:
> 
> "[text here] [text here too]" instead of just "[text here]".
> 
> does anyone know what im doing wrong?
> 
> thanks for any help!
> Alan
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to