[thelist] MySQL REGEXP Help
E Michael Brandt
michael at divaHTML.com
Thu Feb 14 20:26:15 CST 2008
Interesting. I do not understand why mine fails with #1 and #3 yet
works fine with #6. My experience is with javascript really, not so
much with mySQL.
emichael
r937 wrote:
>> i think this has it fixed now.
>
> hmmm, try this --
>
> create table joel
> ( id integer not null primary key auto_increment
> , foo varchar(99)
> );
> insert into joel (foo) values
> ( 'the moon.The dish' )
> ,( 'one thing leads to another' )
> ,( 'one thing.another' )
> ,( 'curly, larry, and moe' )
> ,( 'shemp, joe,and curley joe' )
> ,( 'one.two' )
> ,( 'one!three' )
> ;
>
> okay, that's the test bed
>
> maybe i didn't undertand the backslash-w, but now please try this --
>
> select id
> , foo
> , foo regexp '\.\w' as michael
> , foo regexp '[[:punct:]][[:alnum:]]' as rudy
> from joel
>
> see, here's what i get....
>
> id foo michael rudy
> 1 the moon.The dish 0 1
> 2 one thing leads to another 0 0
> 3 one thing.another 0 1
> 4 curly, larry, and moe 0 0
> 5 shemp, joe,and curley joe 0 1
> 6 one.two 1 1
> 7 one!three 0 1
>
> your mileage may vary, eh ;o)
>
> best regards
>
> rudy
>
--
E. Michael Brandt
www.divahtml.com
www.divahtml.com/products/scripts_dreamweaver_extensions.php
Standards-compliant scripts and Dreamweaver Extensions
www.valleywebdesigns.com/vwd_Vdw.asp
JustSo PictureWindow
JustSo PhotoAlbum, et alia
--
More information about the thelist
mailing list