Jump to content

Topic on Extension talk:Replace Text

RE vs non-RE search feedback on result page.

4
Summary by MvGulik

Related data was already included in output (page-source).

<input type="hidden" name="use_regex"/> (for non-RE search)

vs

<input type="hidden" value="1" name="use_regex"/> (for RE search)

MvGulik (talkcontribs)

I think it would be useful to have some sort of feedback in the search result page if a search used RE or not.

Background reasoning:

I made a little script(Py) that turns a saved html-search-result page into a wiki-table. To potentially post it on request of other users.

Although there are some general ways to identify RE related search strings. It unfortunately can't be made full-proof.

One reason to need to know if it was a RE search, is to be able to fix the highlighted text in the search result. (As "replace Text"'s highlighting has a tendency to not be there. Wich seems related to having a linebreak in the matched string.)

Note: Practically its not needed to have this RE-tag displayed at the result page. If its just some hidden tag in the saved html result page it would do the job too.


Waves at @Kghbln. Your "ray of sunshine" here. Which you blocked from SMW github, and at the same time from SMW-wiki (including the wiki personal page) ... without any warning or any time limit. I guess general blocking rules don't apply to those that are above approach (nothing new under the sun of course, giving current world affairs).

MvGulik (talkcontribs)

O yea. In my final generated result I'm using "&#8629;"() to display line-breaks.

Which I think would be a nice visual improvement to 'Replace Text's output.

(this would also works fine in 'Replace Text's edit-summaries text btw)

Yaron Koren (talkcontribs)

That "enter" character is a good idea; this was just added to the Replace Text code. As for the hidden tag - there is already a hidden tag created, with "name=use_regex"; is that good enough?

MvGulik (talkcontribs)

> That "enter" character is a good idea; this was just added to the Replace Text code.

Cool. :-)


> there is already a hidden tag created, with "name=use_regex"; is that good enough?

Oops, I see it now. Yea, that will definitely do the trick. Thanks.