global regular expression in Kate?

2    19 Dec 2016 04:23 by u/xeemee

can't believe i haven't been able to find an answer on the www, but damn! so far i haven't

sample:

a b

c

i need an expression that will capture all, like a.*c - what i don't know is how to get the global '/g' switch working in Kate

2 comments

0

It is my impression that most regexes are line based and won't search/match across multiple lines. If I needed to do a multiple line match I would be sure to search documentation and the web for "multiple line regular expression" or maybe jump into an interpreter that doesn't work line-wise.

I don't have time to do the searching for you now but if I remember, I will try and come back and if you've got a solution.

0

The Edit Menu

You can modify the search and replace behavior by selecting different options at the bottom of the bar. Selecting will limit finds to entries that match the case (upper or lower) of each of the characters in the search pattern. will search and replace within the current selection only. The Find All button highlights all matches in the document and shows the number of found matches in a small popup.

If that's not enough, then open a konsole window inside kate to grep your document. Or just use Emacs' occur mode. Or use Ed, which has supported global regular expressions since forever.