Hi, I'm trying to insert random data using search/replace. For example:
Search for: .
Replace with: ,[random data].
Before: some text.
After: some text,whatever.
Technically the data doesn't need to be random. It can use characters from the same line. For example:
Search for: .
Replace with: ,[random data].
Before: some text.
After: some text,text.
Any ideas? TIA!
Replace with random data
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 8
- Joined: Tue Apr 04, 2006 12:33 am
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
To copy the word immediately preceding the full stop:
To copy the first word of the line:Find what: ([a-z]+)\.
Replace with: \1,\1.
To copy the first letter of the word immediately preceding the full stop:Find what: ([a-z]+)(.*)\.
Replace with: \1\2,\1.
To copy the last letter of the word immediately preceding the full stop:Find what: ([a-z])([a-z]*)\.
Replace with: \1\2,\1.
These assume you are using Posix regular expression syntax:Find what: ([a-z])\.
Replace with: \1,\1.
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax