wizardyhnr wrote:
> hi, everyone
> i want to insert ".jpg" behind the string
"abc", i can set the regular
> expression to be ^abc, but how to set the replace
parameter, since i
> want the result to be "abc.jpg".
if your string has only three characters, say
"abc", then
pattern: $
replacement: .jpg
result: abc.jpg
If "abc" is just a sub string in another string,
say "the word abc and
def", then you need backreference:
pattern: (abc)
replacement: $1.jpg
Note: you may need word boundary in the pattern part to
filter out
changes of cases from like "abcdef" to
"abc.jpgdef".
Xicheng
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|