Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : RegEx help


mier
02-21-2005, 11:58 AM
Greetings,
First off, thanks for the program, I like it much better than plucker desktop.

I've been trying to figure out how the regular expression syntax is handled. I figured it would be some java derivative since the program is written in java, but I can't seem to figure the syntax. I tried enclosing everything in "'s, but the filter strips those off, so I figure they're "understood". I tried various wildcards like:
.*(alone|showrate)* or just ++showrate\=1 (or \\=1 or just =1, followed by + or ++ or *)
but I can't seem to get it to work. Maybe I'm just malforming the syntax since I'm kind of new at regex, but I want to make sure I'm not missing something simple. An example would be wonderful if any could help.

I was also trying the wildcard side of things since all I really wanted was to filter out URL's with "showrate" in them. I finally figured out that http*showrate* worked but *showrate* by itself would not. Any ideas there?

Thanks for reading,
mier

Laurens
02-22-2005, 02:19 AM
I've been trying to figure out how the regular expression syntax is handled.

Java uses Perl5-style regular expressions, which are used in a variety of languages. Try Googling for "regular expression tutorial (http://www.google.com/search?q=regular+expression+tutorial)".

I was also trying the wildcard side of things since all I really wanted was to filter out URL's with "showrate" in them. I finally figured out that http*showrate* worked but *showrate* by itself would not. Any ideas there?
Sounds like a bug with wildcard matching. Will look into this.

taylor
02-22-2005, 06:13 AM
BTW, at some point I remember you saying something about removing URL rewriting because a lot of people had trouble figuring out how to get them to work correctly. I would really like to see this functionality stay. Are you still planning to remove it Laurens? Would you consider leaving support for it, but just making it harder for the masses to find? My apologies in advance if my memory is all wrong about this.

Laurens
02-22-2005, 09:44 AM
URL rewriting will still be supported in future versions. It's one of Sunrise's most useful features. Scripting will no longer be supported, though. In its present form, URL rewriting relies on scripting, so it will work somewhat differently.

taylor
02-22-2005, 11:51 AM
Ah. I see. If you've got something better in mind, that's great. I agree URL rewriting is very handy.