Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Reverse regexp a regexp? (by an algorithm?)

by freakingwildchild (Scribe)
on Feb 13, 2010 at 22:56 UTC ( [id://823067]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Reverse regexp a regexp?
in thread Reverse regexp a regexp?

How do you make the choices? Once you can answer those questions, you'll be able to make some progress towards what you want.

I'd say ... an algorithm of minimum requirements could do the trick here.

for example:

  1. 10 url's of the same domain of a 95% "similarity" would be matched as "clean url".
  2. 100 url's of the same domain would give more weight
  3. The string detected has to be atleast 4 characters difference before it adds weight/validity
  4. Any others could be selected manually or kept in a cache till they offer a difference
Some url's will be easier than some others (especially script url's); but most sites got a general structure, to be SEO friendly towards search engines; which would make most URL's a heaven to work with...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://823067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-28 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found