Deutsch   English   Français   Italiano  
<v63c14$25m5u$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Richard Owlett <rowlett@access.net>
Newsgroups: comp.editors
Subject: Re: Confused first time Kate user
Date: Wed, 3 Jul 2024 06:17:56 -0500
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <v63c14$25m5u$2@dont-email.me>
References: <v613h1$1m6k5$1@dont-email.me>
 <slrnv88573.3c14.candycanearter07@candydeb.host.invalid>
 <v615b4$1mfng$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 03 Jul 2024 13:17:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a75d54e5e66f89a524576e003dcee4cd";
	logging-data="2283710"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX187EExUAL/pSNWOGmsXpkfp2f0XjIt0gho="
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Firefox/52.0
 SeaMonkey/2.49.4
Cancel-Lock: sha1:Dbj1PupsFyLHZyDTmEvzNSM/3Ak=
In-Reply-To: <v615b4$1mfng$1@dont-email.me>
Bytes: 2386

On 07/02/2024 10:11 AM, Janis Papanagnou wrote:
> On 02.07.2024 17:00, candycanearter07 wrote:
>> Richard Owlett <rowlett@access.net> wrote at 14:40 this Tuesday (GMT):
>>> I have a Debian machine with Kate Version 16.08.3 .
>>>
>>> I wish to do a search & replace using regular expressions.
>>> The "Help" menu has led to
>>> https://docs.kde.org/stable5/en/kate/katepart/regular-expressions.html
>>> and
>>> https://docs.kde.org/stable5/en/kate/katepart/regex-patterns.html
>>>
>>> I have strings of the form "XYZn" where n is one to three digits
>>> representing values of from 1 to 299. I wish to replace all occurrences
>>> with "abc".
>>>
>>> The documents give essentially no examples.
>>>
>>> Help please.
>>> TIA
>>
>>
>> I'd recommend using an online regex generator like
>> https://regex101.com/.
>>
>> This regex expression should do what you want:
>> [[:digit:]]{3}
> 
> Doesn't that mean _exactly_ 3 digits? (The OP wanted 1-299, which
> may be one up to three digits.) Some regexp parsers allow {,3} for
> an up-to range (but that might mean 0-3, thus also not the desired
> expression). Or you can explicitly specify the digits range {1,3}.
> 
> Janis
> 

You correctly interpreted the restrictions I have.