[Goodies-dev] Clipman: Regex substitution?

Christoph Bloch christoph at webrahmen.ch
Sat Feb 20 15:22:59 CET 2010


hello everybody (hope this is the right place. If not, please forgive me)

I believe there is no way to do regex substitution directly in Clipman 
actions, right? If there isn't: Think about introducing it. It would be 
great.

What I'd like to do:
pattern: SR\s([\.\d]+)

    e.g.: "SR 101" or "SR 412.101.220.07" - these numbers always have
    dots (.)

action: exo-open exo-open http://www.admin.ch/ch/d/sr/c\1.html
BUT dots should be replaced by underscores (_):

    "SR 101" works, it sends you to http://www.admin.ch/ch/d/sr/c101.html
    however,
    "SR 412.101.220.07" does not work, as it should go to
    http://www.admin.ch/ch/d/sr/c412_101_220_07.html

Of course I could write a short script (e.g. in perl) that does the 
trick and use that script instead of exo-open. But that's a bit geeky :-)

What do you think about this?

Have a good weekend!
Christoph


P.S. never forget: Clipman actions are great!



More information about the Goodies-dev mailing list