FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Find Strings (Tokens) in File and push them into an array - How?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Find Strings (Tokens) in File and push them into an array - How? [message #169621 is a reply to message #169580] Sun, 19 September 2010 15:55 Go to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Sat, 18 Sep 2010 13:34:52 +0200, aaaa wrote:
>> Obviously you haven't really understood what they are and when pattern
>> matching is the most appropriate tool. Of course you can completely
>> avoid them, but there are enough cases where a replacement for a single-
>> line regex would be many dozen lines of string manipulation functions.
>> _That_ would be hard to debug and understand.
>>
>> Yes, regexps are much easier to write than to read, but that doesn't
>> make them less useful. You just need a good understanding of how they
>> work internally.
>
> I do understand how they work and *sometimes* I use them.
> But it doesn't change the fact they are obscure/obfuscated.

They're *dense*. They're obscure because you don't know what they're
doing. They're not *at all* obfuscated becuase that means they've been
INTENTIONALLY made more obscure than necessary. But nobody ever bothers
to do that in practice because that makes them LESS dense, and slower.

> And having 10 lines of fast, idiot understandable code is much better then
> having one line of regular expressions.

The "fast" part is the hard bit. Lots of VERY smart people have worked
really hard to make regexp parsing and searching as efficient as it can
be, and shared those methods across most (if not all) implementations of
regexp.

--
38. If an enemy I have just killed has a younger sibling or offspring
anywhere, I will find them and have them killed immediately,
instead of waiting for them to grow up harboring feelings of
vengeance towards me in my old age. --Anspach's Evil Overlord list
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Advanced SQL injection complete tool pack(tutorials,scanners,admin finder,shells,md5)
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 16:41:20 GMT 2024

Total time taken to generate the page: 0.04759 seconds