Open Masynchin opened 2 years ago
Proposed tag: question.
I want to make all class {Name}Test to be internal class {Name}Test, so I try to run:
class {Name}Test
internal class {Name}Test
ruplacer 'class (\w+)Test' 'internal class $1Test'
But it doesn't work as expected. I avoided it with
ruplacer 'class (\w+)(Test)' 'internal class $1$2'
But how can solve my issue without adding second capturing group?
@dmerejkowsky I am looking for help!
Try putting a question mark after the + to make it non-greedy.
+
Proposed tag: question.
I want to make all
class {Name}Test
to beinternal class {Name}Test
, so I try to run:But it doesn't work as expected. I avoided it with
But how can solve my issue without adding second capturing group?