Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Can't replace matches with digit class #1082

Open
1 task done
dariopnc opened this issue May 21, 2019 · 1 comment
Open
1 task done

Can't replace matches with digit class #1082

dariopnc opened this issue May 21, 2019 · 1 comment

Comments

@dariopnc
Copy link

Prerequisites

Description

Find function correctly identifies a regexp match using the digit class, but replacing with a match parameter does nothing.

Steps to Reproduce

  1. New file with the following content:
0 	1 	2 	3 	4 	5 	6 	7 	8 	9
10 	11 	12 	13 	14 	15 	16 	17 	18 	19
20 	21 	22 	23 	24 	25 	26 	27 	28 	29
30 	31 	32 	33 	34 	35 	36 	37 	38 	39
40 	41 	42 	43 	44 	45 	46 	47 	48 	49
50 	51 	52 	53 	54 	55 	56 	57 	58 	59
60 	61 	62 	63 	64 	65 	66 	67 	68 	69
70 	71 	72 	73 	74 	75 	76 	77 	78 	79
80 	81 	82 	83 	84 	85 	86 	87 	88 	89
90 	91 	92 	93 	94 	95 	96 	97 	98 	99
  1. Input ^([[:digit:]]+) in the find box (regexp option toggled)
  2. Hit Find, all mathces are correctly identified (first row numbers)
  3. Enter $1. in the replace box and hit Replace All (happens with single Replace, too)

Expected behavior:
All numbers in the first column are postpended a .

Actual behavior:
Nothing changes

Reproduces how often:
100%

Versions

>atom --version

Atom    : 1.37.0
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3

>apm --version
apm  2.1.7
npm  6.2.0
node 8.9.3 x64
atom 1.37.0
python 2.7.16
git 2.21.0.windows.1
visual studio

Windows 10 build 1803

Additional Information

This doesn't happen if you use the match pattern ^([0-9]+)

@rsese
Copy link

rsese commented May 24, 2019

Thanks for the report! Not sure if we should close in favor of #186 but reproduced with 1.37.0 on macOS 10.12.6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants