Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Negating Regexes: Tips, Tools, And Tricks Of The Trade

by jbert (Priest)
on Dec 07, 2006 at 15:53 UTC ( #588371=note: print w/replies, xml ) Need Help??


in reply to Re^2: Negating Regexes: Tips, Tools, And Tricks Of The Trade
in thread Negating Regexes: Tips, Tools, And Tricks Of The Trade

Cool. Thanks very much for this. I was picturing some kind of repeating search-and-replace regexp thing, using the string as a tape, emulating a turing machine. Of course, that's replacement as well but there are also probably a million other reasons why that wouldn't work.

Replies like this are one reason Why Perl Monks Works for Me.

  • Comment on Re^3: Negating Regexes: Tips, Tools, And Tricks Of The Trade

Replies are listed 'Best First'.
Re^4: Negating Regexes: Tips, Tools, And Tricks Of The Trade
by Anonymous Monk on Dec 27, 2014 at 03:27 UTC
    Actually, it's entirely possible that what you describe is Turing-complete. The fact that a regex search and replace is one computing step doesn't place any particular limitation on the expressive power of your scheme. The same is true for an LR parser, which repeatedly uses a finite automaton to find handles. Finite automata can only parse regular languages, yet LR parsers can cope with any language parseable by a deterministic finite automaton, which is a strictly larger set. (For example, it includes the language of expressions with matching parentheses, which is not a regular language.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588371]
help
Chatterbox?
[vedagiri89]: recently purchased centos server and doing migration of app
[choroba]: did you copy any dependencies?
[choroba]: all XS code needs to be recompiled
[vedagiri89]: install perl5.16 in the new server and try to run appache
[hippo]: Which version of CentOS?
[vedagiri89]: how to fix: Attempt to reload DynaLoader.pm aborted
[hippo]: Ah, presumably 7 then.
[vedagiri89]: CentOS Linux release 7.0.1406 (Core)
[hippo]: How did you install libapreq2?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2018-06-19 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (113 votes). Check out past polls.

    Notices?