kate - search/replace using regex

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
sadhu
Level 5
Level 5
Posts: 674
Joined: Fri Nov 22, 2013 9:48 am
Contact:

kate - search/replace using regex

Post by sadhu »

I can't seem to find any control that enables entering regex expressions.

My file has 216 lines containing text like this <p><span class="parno">218</span>
But when I try to search for <p><span class="parno">([0-9]*?)<\/span> I get no hits.
My replacement string would be <p>[\1]

Is there some plugin required?

I'm running kate Version 17.12.3


Thanks
-Sadhu
sabbe sattā bhavantu sukhitattā. LN 19.3-64 Cinn 4.4.8, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:ASUS, Core i3, 4G RAM Intel Gfx
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2751
Joined: Mon Aug 27, 2012 10:17 pm

Re: kate - search/replace using regex

Post by Kadaitcha Man »

sadhu wrote:
Sun Apr 19, 2020 1:36 pm
... I get no hits.
I typed your subject line into a search engine and got 131,000 hits.

The second link was for the official documentation. The first link was a tutorial.

Why you couldn't have done that is beyond me.

Screenshot_20200420_085529.jpg

https://www.msbfr.net/item/250-find-and ... ex-in-kate

https://docs.kde.org/stable5/en/applica ... place.html
It's pronounced kad-eye-cha, not kada-itcha.
sadhu
Level 5
Level 5
Posts: 674
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: kate - search/replace using regex

Post by sadhu »

No hits that worked, that had all of the keywords, I mean. Most were for regex...

But never mind.

This is what my kate screen looks like. Please tell me how I engage regex search.
Attachments
kate-no-regex.png
sabbe sattā bhavantu sukhitattā. LN 19.3-64 Cinn 4.4.8, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:ASUS, Core i3, 4G RAM Intel Gfx
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2751
Joined: Mon Aug 27, 2012 10:17 pm

Re: kate - search/replace using regex

Post by Kadaitcha Man »

sadhu wrote:
Mon Apr 20, 2020 12:41 am
Please tell me how I engage regex search.
I gave you the exact search term, and I gave you two links. You have given no indication that you used the information already provided to you. You'll have to wait for someone to come and spoon-feed you, I'm sorry.
It's pronounced kad-eye-cha, not kada-itcha.
sadhu
Level 5
Level 5
Posts: 674
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: kate - search/replace using regex

Post by sadhu »

I completely removed kate, purged the unnecessary files, and reinstalled. No luck

Then I installed kate in an old copy of LM 18.3. In this version (15.12.3) there is a regex search.
See the attachment.

Notice that "<Ctrl>+<Shift>+u101<space>" STILL doesn't produce the macron-a: ā

Sadhu


BT
Attachments
kate-in-lm18.3.png
sabbe sattā bhavantu sukhitattā. LN 19.3-64 Cinn 4.4.8, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:ASUS, Core i3, 4G RAM Intel Gfx
sadhu
Level 5
Level 5
Posts: 674
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: kate - search/replace using regex

Post by sadhu »

Kadaitcha Man wrote:
Mon Apr 20, 2020 1:04 am
[I gave you the exact search term, and I gave you two links. You have given no indication that you used the information already provided to you. You'll have to wait for someone to come and spoon-feed you, I'm sorry.
Even though your answer is a bit on the snotty side, let me quote the very first result/link (which I had checked before)
  • Regular Expression

    If selected, the search string is interpreted as a regular expression. The Add menuitem at the bottom of the context menu of the text boxes will be enabled and allows you to add regular expression items to the search pattern from a predefined list.

    See Regular Expressions for more on these.
So, looking at the screen caps above, where the h is the selection for "regular expression lm 19.3?" Note that I have a regex selection in my newly-installed kate in LM18.3, but not 19.2

I suppose this lockdown is making all of us a bit testy.

-Sadhu
sabbe sattā bhavantu sukhitattā. LN 19.3-64 Cinn 4.4.8, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:ASUS, Core i3, 4G RAM Intel Gfx
sadhu
Level 5
Level 5
Posts: 674
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: kate - search/replace using regex

Post by sadhu »

Sigh. I completely reinstalled lm19.3, and have added no new applications except kate.

The new version of kate (Kate version 17.12.13, libraries KDE Frameworks 5.44.0, Qt 5.9.5 (built against 5.9.5), The xcb windowing system) now shows the regex button.

note that the version I got using synaptic was version 17.12.3! WHY the different versions??

Still doesn't allow inputting Unicode via Ctrl-Shift-u, though.

So now I'll start installing my standard set of applications, and see if somethning affects kate.

BTW I seem to recall once before I was doing some regex stuff with kate, sed, and komodo, and something happened, the screen locked up or something, or I had to cycle power because i got everything stopped working (this happens to me just about once a day), and it was after that when I discovered kate no longer did regex.

-sadhu
sabbe sattā bhavantu sukhitattā. LN 19.3-64 Cinn 4.4.8, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:ASUS, Core i3, 4G RAM Intel Gfx
Post Reply

Return to “Software & Applications”