Andrei Zmievski
260aee10fe
Fix a long-standing infelicity that resulted in extra regex information
...
not being passed to PCRE functions.
2002-02-12 03:15:27 +00:00
Andrei Zmievski
51f1739983
Expose pcre_get_compiled_regex as an API function.
2002-02-12 03:00:05 +00:00
Andrei Zmievski
d0ed5b984c
- Fixed a bug with matching string containing null bytes.
2002-01-15 15:40:31 +00:00
Zeev Suraski
2f8284ca0a
Fix a warning and remove a printf() that slipped in...
2001-12-22 03:04:14 +00:00
Andrei Zmievski
0858fb4b73
@- Added flags parameter to preg_grep(). The only flag currently is
...
@ PREG_GREP_INVERT that will make the function return entries that
@ did not match. (Andrei)
2001-12-18 19:17:57 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
foobar
f1397d5339
Unified the configure messages.
2001-11-30 19:00:13 +00:00
Andrei Zmievski
3942e2a8bd
Fixed bug #13635 .
2001-11-10 23:45:00 +00:00
Rasmus Lerdorf
02e25f0a1e
# Butt-ugly looking code here, but I need regular expressions to do this.
...
Re-instated safe-mode realm mangling as it was in php 2 and 3 albeit
in a somewhat more robust way.
@ Re-instated safe-mode realm mangling (Rasmus)
2001-10-20 22:01:56 +00:00
Andrei Zmievski
a90e5f5a6b
@- Fixed a bug in preg_replace() that would change the type of the replacement
...
@ array entries to string. (Andrei)
2001-10-17 18:20:19 +00:00
Stig Bakken
689252082c
* zend_module_entry change: apino, debug and zts are moved first,
...
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
Sascha Schumann
23b9300fd1
more tsrm cleanup
2001-08-06 03:50:52 +00:00
Andrei Zmievski
8fca87adb5
Updated to match TSRM changes.
2001-07-30 15:41:11 +00:00
Zeev Suraski
c43806f415
Zend compatibility patch
2001-07-30 08:24:42 +00:00
Zeev Suraski
b0224d51da
Zend compatibility patch
2001-07-30 05:36:18 +00:00
Zeev Suraski
1c25b8dd53
Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way
2001-07-30 01:56:43 +00:00
Zeev Suraski
d87cc976e1
Redesigned thread safety mechanism - nua nua
2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4
- Get rid of ELS_*(), and use TSRMLS_*() instead.
...
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Rui Hirokawa
86ae8add13
added an option to support utf-8 in pcre.
2001-07-13 03:37:18 +00:00
Rasmus Lerdorf
81e2cf03ac
Fix folding and clean up some extensions
2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d
vim-6 does folding - clean up a bunch of missing folding tags plus
...
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Stig Bakken
1beda9ee1e
* include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build)
2001-05-24 10:07:29 +00:00
Andrei Zmievski
e1f671fb5c
Properly free callback_name only when necessary.
2001-05-20 01:21:44 +00:00
Andrei Zmievski
0ee9518396
Move -DSUPPORT_UTF8 flag into the appropriate Makefile so as not to pollute
...
the global namespace.
2001-05-18 15:34:58 +00:00
Andrei Zmievski
58f7df0ae4
Revert previous commit - callback_name does need to be checked because
...
it is set conditional on is_callable_replace.
2001-05-15 18:00:35 +00:00
Andrei Zmievski
eba50153ef
No need for check since callback_name is always filled in.
2001-05-14 12:58:48 +00:00
Sascha Schumann
afdaee9e47
Nuke more quotes
2001-05-12 11:09:05 +00:00
Wez Furlong
340c56e5c7
Fixed leak.
2001-05-12 00:45:55 +00:00
Andrei Zmievski
0eecec7773
@- Fixed a bug in preg_split() that would incorrectly limit the number of
...
@ results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei)
- Fixed a bug in preg_split() that would incorrectly limit the number of
results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei)
- Also made limit = -1 when limit = 0, to emulate Perl.
2001-05-04 16:43:53 +00:00
Sascha Schumann
c44da99842
Fix freeing of a NULL pointer
2001-04-22 17:20:03 +00:00
Andrei Zmievski
1a1018452c
@- Fixed a bug with /e modifier in preg_replace(), that would not correctly
...
@ replace two-digit references if single digit references were present
@ before them. This fixed bug #10218 . (Andrei)
2001-04-16 04:56:31 +00:00
foobar
8a26918ed1
Renamed the AC_ prefixed macros defined in acinclude.m4 to PHP_* prefixes.
...
# Heads up people! I tested this before committing but you never know..
2001-03-27 20:35:04 +00:00
Frank M. Kromann
f49d04fb12
Fixing compiler warning on win32
2001-03-13 16:39:47 +00:00
Andrei Zmievski
285ec0ca2c
@- IMPORTANT: removed /F modifier handling from preg_replace(). Instead
...
@ one should use new preg_replace_callback() function. (Andrei)
2001-03-13 05:24:03 +00:00
Andrei Zmievski
d73ef12429
@- Added array_reduce(), which allows iterative reduction of an array
...
@ to a single value via a callback function. (Andrei)
- Added array_reduce(), which allows iterative reduction of an array
to a single value via a callback function.
- Fixed usage of zend_is_callable() in PCRE.
2001-03-12 03:06:53 +00:00
Andi Gutmans
eb6ba01d1c
- Fix copyright notices with 2001
2001-02-26 06:11:02 +00:00
Sascha Schumann
e8ef0d8b2c
Preprocessor stuff should go into CPPFLAGS.
2001-02-21 07:09:22 +00:00
Andrei Zmievski
df868616aa
Enable UTF8 support (incomplete) by default.
2001-02-20 22:21:06 +00:00
Andrei Zmievski
a798fe8d5d
Include PHP compatibility header file.
2001-02-20 22:20:47 +00:00
Andrei Zmievski
6542e70473
Upgrade PCRE to version 3.4.
2001-02-20 22:00:33 +00:00
Andrei Zmievski
51c535f510
Move todo items.
2001-02-08 04:55:49 +00:00
Andrei Zmievski
56d3b036ec
Adding delimiter capturing functionality.
...
As far as NEWS, compilation fixed don't belong here.
2001-02-03 04:53:49 +00:00
Andrei Zmievski
898baa8b54
No need for CLS_FETCH().
2001-02-01 15:25:53 +00:00
Sascha Schumann
23ddeac9a5
Fix broken ZTS build
2001-02-01 15:24:17 +00:00
Andrei Zmievski
0651b4ff16
Modified /F handling to allow calling object methods.
2001-02-01 05:04:58 +00:00
Andrei Zmievski
b56006b5b2
If we can't call custom replacement function, don't change the subject
...
string.
2001-01-22 22:05:04 +00:00
Andrei Zmievski
5afcfc4498
Don't need to check for out-of-memory condition.
2001-01-22 19:42:29 +00:00
Andrei Zmievski
5068444dfe
Z-ify the source.
2001-01-22 19:29:44 +00:00
Andrei Zmievski
34f5c0c36d
Fix argument check (bug #8421 ).
2000-12-27 13:59:40 +00:00
Andrei Zmievski
a1614b8411
(PHP preg_replace) Fix to allow proper escaping of captured subpattern
...
references in the replacement string.
(PHP array_sum) Check that argument is an array.
2000-12-22 16:31:42 +00:00
Zeev Suraski
aa6d2ac5d0
Heads up people!
...
Updated the get_current_key() API - the relevant authors, please take
a look at the updated code and make sure it's ok...
2000-12-22 12:57:09 +00:00
Sascha Schumann
1626ba7ee9
Oh man, gcc's logic is really flawed
2000-11-27 13:28:26 +00:00
Sascha Schumann
aa6a62d96d
Kill a warning (code is correct)
2000-11-27 13:13:25 +00:00
Andrei Zmievski
def5059f44
Fix the arg array size.
2000-11-24 00:12:19 +00:00
Andrei Zmievski
0af5c36d94
This submission introduces two features.
...
The first one is support for Perl-style matching regexp delimiters, i.e.
using <[{( and )}]> to delimit the regular expressions.
The second one is a new 'F' modifier that allows you to specify a function name
in the replacement argument to preg_replace(). This function will be called
when the replacement needs to be made. It is passed an array of full matched
pattern and captured subpatterns and it is expected to return a string that
will be used for replacement. 'e' and 'F' modifiers cannot be used together.
@- Implemented support for Perl-style matching regexp delimiters in PCRE.
@ You can use <{[( and )]}> to delimit your expressions now. (Andrei)
@- Introduced new 'F' modifier in PCRE that lets you specify a function
@ name in the replacement argument to preg_replace() that will be called
@ at run-time to provide the replacement string. It is passed an array of
@ matched pattern and subpatterns. (Andrei)
2000-11-23 17:25:13 +00:00
Hartmut Holzgraefe
1f6878e912
2nd step towards auto-credits
2000-11-20 10:33:33 +00:00
Andrei Zmievski
3625a729a7
- Modified preg_replace() to take Perl-style $1 backreferences in addition
...
to \\n ones.
- Modified preg_grep() to always return the results with the keys
from the original array.
2000-11-15 05:09:55 +00:00
Andrei Zmievski
468068705f
@- Modified preg_replace() to ignore backreferences that refer to
...
@ non-existing subpatterns. (Andrei)
2000-11-13 19:49:41 +00:00
Andrei Zmievski
b111463f4c
Fixed bug #6740 .
...
I happen to think that this is php_addslashes() problem, not PCRE's.
When 0 is passed for the length of the string to php_addslashes() it
assumes that we want to process the whole string and happily runs
strlen() on it. That is bad. It should respect the length and return
an empty string if it's 0.
2000-09-14 15:44:36 +00:00
Zeev Suraski
6c3d7449e1
- Made eval() and several other runtime-evaluated code portions report the
...
nature and location of errors more accurately (Stas)
2000-09-12 20:48:33 +00:00
Andrei Zmievski
4df36948c8
@- Fixed a bug in preg_replace() that would truncate subject string if the
...
@ first argument was en empty array. (Andrei)
This fixes bug #6346 , that would truncate subject string if the
first argument was en empty array.
2000-08-25 13:51:07 +00:00
Andrei Zmievski
d7c43de3ce
@- Fixed a bug that did not respect limit parameter in preg_replace() when
...
@ using /e modifier. (Andrei)
2000-08-24 13:23:13 +00:00
Andrei Zmievski
4f96d15f33
Reverting the pemalloc -> malloc change until we figure out why it breaks.
2000-08-17 19:01:28 +00:00
Andrei Zmievski
ba0e3f2145
No need to have persistent allocation.
2000-08-17 16:09:00 +00:00
Andrei Zmievski
9de5b9e04a
# There you go, Wico.
...
Fix bug $5676.
@- Fixed preg_replace() to automatically escape quotes in matched
@ strings when using /e modifier. (Andrei)
2000-07-20 15:27:16 +00:00
Sascha Schumann
16017f6d78
Change header protection macros to conform to standard.
...
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"
All identifiers that begin with an underscore and either an uppercase
letter or another underscore are always reserved for any use by the
implementation.
2000-07-02 23:46:51 +00:00
Andrei Zmievski
1ca7f07d1a
Typo.
2000-06-30 19:40:42 +00:00
Andrei Zmievski
29e8e565c6
@- Added an optional parameter to preg_replace() that can be used to
...
@ specify how many replacements to make. (Andrei)
2000-06-28 20:07:26 +00:00
Andrei Zmievski
7ef638aa30
@- Upgraded PCRE to version 3.2 and fixed a bug when anchored pattern
...
@ matched an empty string. (Andrei)
2000-06-12 19:55:58 +00:00
Andrei Zmievski
f20194149f
One more place.
2000-06-10 19:44:34 +00:00
Andrei Zmievski
43793b94f7
Terminate the string with '\0'.
2000-06-10 19:43:20 +00:00
Andi Gutmans
3701bc4207
- ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch
2000-06-05 19:47:54 +00:00
Andrei Zmievski
4ef2af7c72
Update header file.
2000-06-01 16:34:50 +00:00
Andrei Zmievski
1db5c7d1e2
@- Cleaned up PCRE extension and made it binary-safe. (Andrei)
2000-06-01 16:34:00 +00:00
Andrei Zmievski
8a5bc5b674
Update proto.
2000-05-25 21:07:07 +00:00
Andrei Zmievski
0a142bb94e
@- Added second argument to preg_quote() which allows quoting of
...
@ one additional character, usually the regex delimiter. (Andrei)
2000-05-25 21:04:09 +00:00
Sascha Schumann
4686a3b50e
Use #ifdef COMPILE_DL_EXTNAME solely.
2000-05-23 09:33:51 +00:00
Zeev Suraski
e043439ff6
Update the license with the new clause 6
2000-05-18 15:34:45 +00:00
Andrei Zmievski
0060f95699
Fixes for possible failure of zend_eval_string().
2000-05-06 17:57:34 +00:00
Sascha Schumann
82c5c690c9
Use the new AC_ADD_LIBRARY_WITH_PATH option shared-libadd
2000-05-02 04:01:15 +00:00
Sascha Schumann
fe50664d4d
#if COMPILE_DL
...
becomes
#if defined(COMPILE_DL) || defined(COMPILE_DL_EXTENSION_NAME)
2000-05-02 00:44:35 +00:00
Sascha Schumann
0d383d9373
Replace the various get_module() functions with a uniform
...
ZEND_GET_MODULE(name) macro.
2000-05-02 00:30:36 +00:00
Sascha Schumann
7613e064f8
Remove trailing empty lines
2000-05-01 22:38:42 +00:00
Sascha Schumann
0d36199cf9
Large test commit IV
2000-05-01 22:04:52 +00:00
Sascha Schumann
de2cea47c0
Large commit test III
2000-05-01 22:00:09 +00:00
Sascha Schumann
a481fddfb3
Improved in-tree shared libraries build system
...
The following new/revived shared modules are available now:
... MySQL (*)
... PCRE (*)
... Session
... SWF
(*) capable of using bundled library or external library
All changes:
The m4 macro PHP_EXTENSION was revamped. Uses LIB_BUILD now.
This effectively means that all extensions have to use dynlib.
ext/mysql/config.m4 was revamped.
Uses LIB_BUILD for building bundled library.
ext/pcre/config.m4 was revamped.
Uses LIB_BUILD for building bundled library.
ext/ext_skel was changed to reflect that more modules should be
compileable as shared module.
ext/Makefile.in has been simplified enormously.
Dependencies are now stored in the build tree.
Empty dependencies are not generated by buildconf anymore. They
are now dynamically created during the build process.
Implicit rules for .S were removed.
The NO_RECURSION feature was removed.
"libs.mk" has been added to all cvsignore files in ext.
2000-05-01 02:42:55 +00:00
Sascha Schumann
953fe189da
Overall UNIX build system improvements:
...
* Makefile header is now completely dynamic
* Absolute paths in (top_)?(src|build)dir and VPATH
(fixes Tru64 support)
* VPATH does not contain variables anymore
(fixes UnixWare support)
2000-04-30 03:20:09 +00:00
Andrei Zmievski
5c5ec88292
@Added substr_count() from Peter Kovacs. (Andrei)
...
# also some todo stuff
2000-04-26 00:29:59 +00:00
Sam Ruby
5684953d59
make it compile on Win32
2000-04-12 18:18:49 +00:00
Andrei Zmievski
da1cca03ae
Re-add.
2000-04-11 18:40:47 +00:00
Andrei Zmievski
e39d70fff6
Added PCRE 3.01.
2000-04-11 17:36:06 +00:00
Andrei Zmievski
beb6916cfc
*** empty log message ***
2000-04-11 17:35:42 +00:00
Colin Viebrock
a7c8bfb9fb
phpinfo() prettying
2000-04-06 21:07:44 +00:00
Colin Viebrock
fddd1201b4
phpinfo() prettying
2000-04-05 20:42:59 +00:00
Andrei Zmievski
213491a146
Expanded checking for pcre.h and libpcre.a.
2000-03-07 16:12:35 +00:00
Stig Bakken
d02fe90b00
Change extension names in all extensions' zend_module_entry to their
...
directory name.
2000-03-06 18:44:01 +00:00
Sascha Schumann
315999da94
Prefix some symbols with php_
...
^(pcre|Xml|XML).*
2000-03-04 14:44:01 +00:00
Andrei Zmievski
2b9b11d3af
Fix bug #3599 .
2000-02-24 14:37:05 +00:00
Egon Schmid
11e2405489
More protos.
2000-02-23 16:38:38 +00:00
Zeev Suraski
86fa2aade2
the pipe is breaking all the time
2000-02-19 23:41:32 +00:00
Andrei Zmievski
24150ded0d
Changing the header.
2000-02-15 14:24:46 +00:00
Zeev Suraski
2460569ccb
Change string->str where possible; string is basic a C++ class, so gdb can't look
...
inside variables named 'string'.
2000-02-08 22:21:43 +00:00
Zeev Suraski
3a816341f9
Cleanup patches
2000-02-05 15:16:12 +00:00
Zeev Suraski
62114c1806
Destructors no longer return ints, the low level problem it was intended to solve is long gone now...
2000-01-17 17:33:37 +00:00
Andrei Zmievski
878906fbb8
Another idea I had today.
2000-01-15 21:35:50 +00:00
Sascha Schumann
43ae2bffbb
Happy Y2K patch! Happy new year (or the new millennium, depending on whether
...
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Sascha Schumann
2c99bef442
Get rid of config.h.stub. Note that you should embed a comment about
...
what the respective define does into the AC_DEFINE macro. I.e.
AC_DEFINE(HAVE_FOO, 1, [Whether you have FOO])
1999-12-30 04:07:46 +00:00
Sascha Schumann
f2f8d38efa
Integration of -ng changes. Changes:
...
- added support for externally built modules,
- improved support for in-tree shared modules,
- fixed diversion bugs,
- configure displays some informative messages,
- faster static build
(libtool isn't used anymore for compiling non-PIC objects),
- dependencies comparable to automake's without requiring GNU make or GCC,
- working make clean for non-GNU makes.
1999-12-30 02:59:53 +00:00
Zeev Suraski
235386b245
Change ALLOC_ZVAL() semantics
1999-12-26 21:21:33 +00:00
Andi Gutmans
3f6e00e48d
- Use ALLOC_ZVAL() in PHP. Finding the places to put FREE_ZVAL(z) is much
...
more tricky and I'm not sure how many places this is. zval allocations
were only made directly in 11 places.
1999-12-24 15:43:39 +00:00
Andrei Zmievski
742c58c240
(PHP preg_quote) Made binary-safe.
...
@ Made preg_quote() binary-safe. (Andrei)
1999-12-20 20:49:56 +00:00
Zeev Suraski
a1ad2872ee
- The tree compiles again
1999-12-18 22:40:35 +00:00
Andrei Zmievski
4f52bab52f
Need to check for __inet_aton on Solaris.
1999-12-07 16:26:42 +00:00
Andrei Zmievski
a9a5f24029
Add another item.
1999-12-06 16:41:55 +00:00
Sascha Schumann
4a60eed469
Fix some warnings
1999-12-05 16:25:32 +00:00
Stig Bakken
ae1b7bf4b8
@Fix warnings compiling in maintainer mode. (Stig)
...
Fix warnings compiling in maintainer mode.
Install DB/common.php and DB/mysql.php on "make install".
# We still have a warning from http_config.h:97. Rasmus? :-)
1999-12-05 10:29:06 +00:00
Sascha Schumann
5b983c944f
Clean up php3.*\.h files. The files itself are renamed, and references in all
...
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
1999-12-04 19:19:57 +00:00
Andrei Zmievski
3ae0f5fdc4
(PHP preg_replace) Fixed a bug that cause backreferences to lose
...
their value after the first occurrence.
1999-11-19 22:59:12 +00:00
Andrei Zmievski
71a8c018cb
Fixed a bug that would replace only the first occurrence and result in
...
a parse error for the rest when using /e modifier.
1999-11-19 22:28:06 +00:00
Sascha Schumann
3dc7757a99
Remove the extra INCLUDES line from most automake Mafiles. This is not
...
necessary, because we can change the value of INCLUDES globally in one
place (configure.in).
Also add two defines in thread-safe mode
(_REENTRANT and POSIX_PTHREAD_SEMANTICS)
1999-11-13 12:41:09 +00:00
Andrei Zmievski
e921d0feab
Fix bug #2623 .
1999-10-28 16:41:17 +00:00
Sascha Schumann
387f15d895
Define USE_BCOPY, if memmove is not found (i.e. SunOS 4). Fix for #2480
1999-10-24 16:41:07 +00:00
Andrei Zmievski
ce1f3a7d83
Make string copying a little more efficient.
1999-10-15 20:36:10 +00:00
Andrei Zmievski
22fb5f281a
Renamed a couple of functions to have proper php_ prefix.
1999-10-15 20:04:31 +00:00
Andrei Zmievski
d3a39771c1
(_php_replace_in_subject)
...
(PHP preg_replace):
Fixed a bug that happened when regex was an array and replacement was a
single non-string value. Also changed conversions to use
convert_to_string_ex().
(PHP preg_grep): use convert_to_string_ex() for proper conversion
1999-10-15 16:57:54 +00:00
Sascha Schumann
232afa4816
* archive-based convenience libraries completely replaced
...
with libtool components
* SAPI targets can enable thread-safe mode and define
shared/static/program build target
* all configure scripts use the same config.cache
* phplibdir is $(top_builddir)/modules to avoid
permission problems
* sapi/*/Makefile.inc are gone
* runpath handling cleaned up
* top-level Makefile.in obsoleted through Makefile.am
* --enable-versioning uses libtool's cleaner and more
portable -export-symbols feature
1999-10-04 15:18:26 +00:00
Andrei Zmievski
a92fb5fe3d
rename.
1999-10-01 14:54:55 +00:00
Andrei Zmievski
7258842c29
preg_replace() now makes copies of array entries if arrays are passed in,
...
so that convert_to_string() preserves the originals. Is this the correct way to do it?
1999-09-30 21:59:46 +00:00
Sascha Schumann
cf4afd61f0
* create Makefiles for ext, pcrelib, sapi/*
...
* copy files for Apache from $(srcdir)
1999-09-29 22:18:43 +00:00
Andrey Hristov
bfa7b6b145
- Updated array functions to use high-performance API
...
- Updated preg_split() to allow returning only non-empty pieces
1999-09-24 22:44:41 +00:00
Andrey Hristov
ba01cefc0c
Update to new high-performance function API.
1999-09-24 20:11:06 +00:00
Andrey Hristov
9f07657b48
Small clarification.
1999-09-23 15:37:01 +00:00
Sascha Schumann
e20af627c2
improve short help messages
1999-09-16 15:35:49 +00:00
Andrey Hristov
870a6679ff
- Updated bundled PCRE library to version 2.08
...
- Made it possible to specify external location of the PCRE library
- Reworked PCRE extension to use updated PCRE library API
Hopefully now everything behaves just like Perl..
1999-09-14 19:24:37 +00:00
Andrey Hristov
5e4a85f2e3
Static is good...
1999-09-03 21:12:10 +00:00
Andrey Hristov
f72897c29d
Practice what you preach, I guess.
1999-09-03 19:01:19 +00:00
Rasmus Lerdorf
8ccce347a3
Missing return types in prototypes
1999-08-26 14:13:14 +00:00
Egon Schmid
17f132f9ee
Here was also something missing
1999-08-19 20:31:57 +00:00
Andi Gutmans
aeec4e198a
- Fixed memory leaks. tsrm resource id deallocation still needs to be implemented.
1999-08-19 16:52:53 +00:00
Philippe Verdy
236d54114c
make pcre test program compile again with Zeev's
...
additions in the pcre_exec() function parameters
1999-08-15 23:52:37 +00:00
Zeev Suraski
3cb1eb0471
Removed '3' from key functions in PHP (maintained compatibility through
...
php3_compat.h)
1999-08-02 19:17:14 +00:00
Egon Schmid
b55a6c9185
Another forgotten prototype. Andrey, why is preg_grep in PHP3 missing?
1999-08-01 18:18:40 +00:00
Andrey Hristov
a5a07063d2
*** empty log message ***
1999-07-22 14:22:32 +00:00
Andrey Hristov
6b82192bf7
Added locale support.
1999-07-20 20:57:04 +00:00
Andrey Hristov
3335c8ea0d
-Kill compile warnings in apache.c
...
-Make preg_grep() work with copies of array entries
1999-07-17 20:03:10 +00:00
Zeev Suraski
c5724cbd14
License update
1999-07-16 13:13:16 +00:00
Andrey Hristov
be66f224b0
*** empty log message ***
1999-07-12 17:16:14 +00:00
Zeev Suraski
c43c235427
Don't touch refcount and EA directly
1999-07-09 20:45:55 +00:00
Zeev Suraski
5f62c347c7
Step 2:
...
Rename is_ref to EA
1999-07-09 17:44:41 +00:00
Zeev Suraski
3a9cb0220c
Step 1 in nuking the garbage collector:
...
- Change the hash destructor to return int
1999-07-09 17:36:12 +00:00
Andrey Hristov
cef4df1fee
Reduce clutter a bit.
1999-07-08 21:42:29 +00:00
Zeev Suraski
5baaa716dc
Support PCRE under Win32
1999-07-06 19:49:48 +00:00
Zeev Suraski
8ee9fd5768
avoid two copies of pcre.c in the repository
1999-07-06 19:24:13 +00:00
Andrey Hristov
7aa981f5b7
Correct option caching
1999-07-05 15:25:51 +00:00
Andrey Hristov
31c8ec4c80
Made preg_split() consistent with split().
...
Added a new /e modifier for preg_replace
Kill a warning in pcrelib.
1999-06-22 14:56:32 +00:00
Andrey Hristov
3b1843bc9f
Added preg_grep() function.
1999-06-10 14:41:38 +00:00
Andrey Hristov
b331ead5bf
A fix for a fix.
1999-06-09 21:21:27 +00:00
Andrey Hristov
3d45dd58b8
Fixed a bug in preg_split.
...
Fixed a bug in array_shift/array_pop.
1999-06-09 21:13:05 +00:00
Andrey Hristov
2a64925a67
Fixed a bug in preg_replace.
1999-06-09 15:02:57 +00:00
Andrey Hristov
dbfeaabb16
Added preg_quote() function.
1999-06-04 13:56:23 +00:00
Andrey Hristov
c7a606c4a3
*** empty log message ***
1999-06-04 13:37:44 +00:00
Andrey Hristov
aea7498779
*** empty log message ***
1999-06-01 20:31:39 +00:00
Andrey Hristov
aba3ea97cd
preg_match_all() now returns the number of global matches.
1999-05-30 14:48:39 +00:00
Andrey Hristov
a88b37788e
Updated preg_split().
1999-05-29 20:45:00 +00:00
Andrey Hristov
70dc46892a
Fix preg_match_all to do proper matching with \b.
1999-05-29 20:04:05 +00:00
Andrey Hristov
9c970e1910
Fixed PCRE so that global matching with patterns with \b works.
1999-05-29 19:38:50 +00:00
Zeev Suraski
0eb1498fa8
* Get Apache module to compile again with the regex stuff.
...
* Get Apache to propertly work with POST, and some SAPI fixes
1999-05-28 22:41:48 +00:00
Andrey Hristov
3fe94e5b37
-Modified PCRE library slightly to do what needs to be done
...
-Updated preg_replace() code to handle stuff properly
-Removed ability to specify external PCRE library source to link against
(since our bundled version is patched now)
1999-05-28 20:54:52 +00:00
Andrey Hristov
a5138d2724
We don't need those there.
1999-05-27 14:02:29 +00:00
Andrey Hristov
e10e4dbe10
Really fix the configuration now so that it's possible to compile both
...
against the bundled PCRE library and the one external to the source tree.
Crossing my fingers while Zeev compiles this. :)
1999-05-27 13:59:39 +00:00
Sascha Schumann
5d0a7599a9
- fix CGI build (at least)
1999-05-27 01:34:18 +00:00
Zeev Suraski
36947fc45a
Fix pcre build
1999-05-27 01:19:00 +00:00
Andrey Hristov
66f850e5b7
-Added PCRE library source
...
-Updated configuration process
1999-05-26 21:47:57 +00:00
Andrey Hristov
d73c638526
Added preg_split. Same syntax as regular split().
1999-05-26 18:59:04 +00:00
Andrey Hristov
0062ae6218
A few changes here.
...
First of all, as per extensive discussion on the list, the functions are now
prefixed with "preg" instead of "pcre".
Secondly, global matching is now possible using preg_match_all. Please, give
suggestions on a better name if this one doesn't sit well with you. Possible
names are preg_global_match and preg_gmatch.
preg_match_all takes 4 arguments: a regex pattern, a subject string,
the array for capturing subpatterns, and a parameter that tells how the results
in the subpatterns array are arranged.
Basically, preg_match_all will go through the subject string and try to capture
all the matches that it finds, not just the first one like preg_match.
4th parameter can be PREG_PATTERN_ORDER (default) or PREG_SET_ORDER.
Example:
preg_match_all("|</?([^>]+)>|", "<div align=left>a test</div>", $out, PREG_PATTERN_ORDER);
This returns results so that $out[0] is an array of full pattern matches, $out[1] is an array
of first captured subpattern matches, and so on.
$out[0] -> ("<div align=left>", "</div>")
$out[1] -> ("div align=left", "div")
Example:
preg_match_all("|</?([^>]+)>|", "<div align=left>a test</div>", $out, PREG_SET_ORDER);
This returns results so that $out[0] is an array of first full pattern match and subpatterns,
$out[1] is an array of second full pattern match and subpatterns.
$out[0] -> ("<div align=left>", "div align=left")
$out[1] -> ("</div>", "div")
If anyone has a better name for these PREG_ constants and also which one should be the default,
I'd like to hear it.
1999-05-26 15:22:02 +00:00
Andrey Hristov
57b22c8b64
Some comments.
1999-05-22 19:46:27 +00:00
Andrey Hristov
912f17d278
Added ability to pass array parameters to pcre_replace.
1999-05-22 19:14:57 +00:00
Andrey Hristov
e3a70c1f04
-Added regex cache
...
-Made module thread-safe
1999-05-21 19:27:44 +00:00
Andrey Hristov
be9dc58cfe
Get rid of debug printf's.
1999-05-21 13:29:05 +00:00
Andrey Hristov
17bbbf2963
Initial check-in of PCRE (Perl Compatible Regular Expressions) extension.
...
PCRE library can be found at ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/
config.m4 will be updated to be more robust later on.
perl_match() takes a regular expression, the source string, and the array
for subpattern matches.
perl_replace() takes a regular expression, the search string, and the replacement
string.
Regular expression is specified using delimiters and options. Example:
perl_match("/<[a-z]*>/i", $text, $tags);
More stuff is coming soon.
1999-05-21 13:17:23 +00:00