My english is poor so that I only can express the question with lisp code.
;Fisrt step:
(setq pattern1 "`[12`]")
(setq ss (ssget (list (cons 1 (strcat "*" pattern "*")))))
(setq v1_list (cjw-ss-value_list ss 1))
;_$ v1_list
("abc[12]" "abc[12]test" "123[12]")
;Second step:
(setq pattern2 "[12]")
(setq new_pattern "[abc456]")
(setq string "abc[12]test")
(while (vl-string-search pattern2 string)
(setq string (vl-string-subst new_pattern pattern2 string))
)
;_$ string
"abc[abc456]test"
If (= pattern2 pattern1 "`[12`]")
How to finish the Second step ?
I am sorry my poor english that i can't express the problem clearly!
always i want to help others. always have this trouble.