graby icon indicating copy to clipboard operation
graby copied to clipboard

Regex Strip

Open zyuhel opened this issue 3 years ago • 2 comments

Hello everyone, Is it possible to write config to strip or replace some values based on regex not on xpath?

zyuhel avatar Dec 11 '20 13:12 zyuhel

Not possible yet and quite complex because executing regex on html is hard.

j0k3r avatar Dec 15 '20 04:12 j0k3r

Regex imo could be executed on two steps, first one on full html, it is not the best way to do it, but it is not pretty bad, if user write bad config, it is always problem of the user. And the second one, on the extracted config. Something like

regex_strip_before: regex_strip_after:

I could write it and make pr, but i am not sure, will it ever be included. Or should i make it around graby not inside.

zyuhel avatar Dec 15 '20 06:12 zyuhel