I have text in the following pattern:
1 NAME word1 word2 wordn /words/
...
...
1 NAME word1 word2 wordn /words/
And I need a regex that will reorder it to:
1 NAME /words/ word1 word2 wordn
...
...
1 NAME /words/ word1 word2 wordn
I am trying to do this in notepad++ but can't figure out the regex to match n number of words until the character /
Please help!
Find: ([^ ]+) ([^/]+)/([^/]+)/
([^ ]+) Matches "name" as anything but a space into group \1 (followed by a space)([^/]+) Matches "all words" as anything up until the first / into group \2
/([^/]+)/ Matches anything between / and / into group \3
Replace With: /\3/ \2\1
Try
(?<=1 NAME )(\S+ ){n}/words/
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With