[pcre-dev] [Bug 1458] Identifying patterns without any speci…

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 1458] Identifying patterns without any special characters...
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1458

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID





--- Comment #1 from Philip Hazel <ph10@???> 2014-04-01 17:25:08 ---
if (strchr("pattern", "^$\\([{|.*?+") == NULL) the pattern does not contain any
regex metacharacters. There is then no need even to compile it. Examining a
compiled pattern is not possible because the internals are not public and do
change from time to time. (You can use pcretest to output the internals and
check that, but surely checking the original pattern is much more efficient.)
You could be even cleverer than the simple test and check, for example, that
'^' occurs only at the start of a pattern and handle that yourself. I'm closing
this item because this isn't a bug and there is no possibility of future
action.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email