Find, replace, find in files, replace in files, regular expressions
by EllE » Sat Jun 17, 2006 5:19 pm
how sort this text, please
example:
- Code: Select all
[img]http://...[/img][img]http://...[/img][img]http://...[/img]
into:
- Code: Select all
[img]http://...[/img]
[img]http://...[/img]
[img]http://...[/img]
AND another sorting
- Code: Select all
[img]http://...[/img]
[img]http://...[/img]
[img]http://...[/img]
[img]http://...[/img]
[img]http://...[/img]
[img]http://...[/img]
into (two colums):
- Code: Select all
[img]http://...[/img][img]http://...[/img]
[img]http://...[/img][img]http://...[/img]
[img]http://...[/img][img]http://...[/img]
-

EllE
- Basic User

-
- Posts: 12
- Joined: Mon Jun 12, 2006 11:00 pm
by bellafortuni » Tue Jun 20, 2006 7:01 pm
search and replace (regular expr's unchecked)
1:
find what: [/img][img]
replace with: [/img]^p[img]
2:
find what: [.img]http://...[/img]^p[.img]http://...[/img]
replace with: [.img]http://...[/img][.img]http://...[/img]
(period added to [.img] to prevent rendering)
-

bellafortuni
- Basic User

-
- Posts: 10
- Joined: Tue Aug 10, 2004 11:00 pm
by EllE » Wed Jun 21, 2006 2:06 am
first works great ... thanx
but second is not variable ...
i need something like:
- Code: Select all
Find "[img]*^[/img]^p[img]*^[/img]"
Replace All "[img]^1[/img][img]^1[/img]"
and testing this stupid method:
- Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Loop
Key END
Key DEL
Key DOWN ARROW
Else
ExitLoop
EndIf
EndLoop
-

EllE
- Basic User

-
- Posts: 12
- Joined: Mon Jun 12, 2006 11:00 pm
by Mofi » Wed Jun 21, 2006 5:07 am
EllE wrote:but second is not variable ...
i need something like:
- Code: Select all
Find "[img]*^[/img]^p[img]*^[/img]"
Replace All "[img]^1[/img][img]^1[/img]"
Correct is:
UnixReOff
Find RegExp "^(^[img^]*^[/img^]^)[ ^t]++^p^(^[img^]*^[/img^]^)"
Replace All "^1^2"
-

Mofi
- Grand Master

-
- Posts: 4068
- Joined: Thu Jul 29, 2004 11:00 pm
- Location: Vienna
Return to Find/Replace/Regular Expressions