i want to replace the last index of comma (,
)in string with and
.
eg . a,b,c
with 'a,b and c'
eg q,w,e
with q,w and e
i want to replace the last index of comma ( eg . eg |
||||
|
you can also use this function
|
||||
|
This regex should do the job
|
|||
|
Try the following
|
|||
|
Try
|
|||
|
A simple loop will help you out first find the index of all , in your string using,
This will solve your purpose. |
|||
|