Skip to content
Browse files

Merge branch 'master' of https://github.com/serkanserttop/lib_mysqlud…

…f_preg into dev-1.2
  • Loading branch information...
2 parents d091650 + 203188b commit 1ff3a71f4638a16f7751f2ba6bb05031fc27173b raw committed
Showing with 14 additions and 3 deletions.
  1. +7 −0 INSTALL
  2. +7 −3 README.md
View
7 INSTALL
@@ -27,6 +27,13 @@ Example (on macosx with fink)
Please use: ./configure --help to see the other options
+Example (on macosx with MAMP)
+------------------------------
+Follow the example at the link below to compile Mysql and place the lib files in the correct folders
+http://addto.it/Patching-MAMP-2.0.5-to-work-with-Sphinx-2.02
+
+Then configure lib_mysqludf_preg with
+./configure --with-mysql=/Applications/MAMP/Library/bin/mysql_config
== Compile ==
Type make
View
10 README.md
@@ -38,13 +38,17 @@ version of lib_mysqludf_preg.
Some examples:
-------------
-- SELECT PREG_CAPTURE( '/(new)\\s+([a-zA-Z]*)(.*)/i' , description, 2 ) FROM state WHERE description LIKE 'new%' ;
+- SELECT captured, description FROM
+ (SELECT PREG_CAPTURE( '/(new)\\\\s+([a-zA-Z]*)(.*)/i' , description, 2 ) as captured FROM state WHERE description LIKE 'new%') as t1
+ WHERE captured IS NOT NULL;
-- SELECT PREG_POSITION( '/(new)\\s+([a-zA-Z]*)(.*)/i' , description, 2 ) FROM state WHERE description LIKE 'new%' ;
+- SELECT position, description FROM
+ (SELECT PREG_POSITION( '/(new)\\\\s+([a-zA-Z]*)(.*)/i' , description, 2 ) as position FROM state WHERE description LIKE 'new%') as t1
+ WHERE position IS NOT NULL;
- SELECT * from products WHERE PREG_RLIKE( '/hemp/i' , products.title )
-- SELECT PREG_REPLACE( '/fox/i' , 'dog' , 'The brown fox' )
+- SELECT CONVERT( PREG_REPLACE( '/fox/i' , 'dog' , 'The brown fox' ) USING UTF8) as replaced;
Please see test/lib_udfmysql_preg.test and test/lib_udfmysql_preg.result for
more examples.

0 comments on commit 1ff3a71

Please sign in to comment.
Something went wrong with that request. Please try again.