Page 1 of 1

rex question-- pattern in first three characters

Posted: Tue Oct 28, 2003 8:40 pm
by jkj2001
Hi,

I have some filenames stored in a database column. I'm looking for those which follow this pattern:

number number carat...

Like this, for instance (no quotes)-- "06^03 CMU RATEMOD.xls"

Could someone help me with a rex expression for this? Thanks!

rex question-- pattern in first three characters

Posted: Tue Oct 28, 2003 11:00 pm
by John
A REX expression to match it would be:

>>=\digit\digit\^=

rex question-- pattern in first three characters

Posted: Wed Oct 29, 2003 11:16 am
by jkj2001
Thanks John-- why the equals sign at the end, btw?

rex question-- pattern in first three characters

Posted: Wed Oct 29, 2003 11:46 am
by John
That means one occurrence of the preceding subexpression (\digit\digit\^), and is not technically required at the very end of the expression, but is useful to have in case you wanted to add more to the end of the expression.