Hi i want to know if it is possible to replace text with regex and do some math operation.
x10 y10 -> xy20
I would search this with
and replace it with ?
xy($1+$2) ? (don't know what operation to use)
- Posts: 1
- Joined: Sun Jun 16, 2013 8:47 am
Regular expressions can't do this. However, many languages' regex libraries (such as Python's) have the ability to pipe the replacement through a function. You could write a plugin.
- Posts: 1390
- Joined: Mon Oct 19, 2009 9:12 pm
Return to General Discussion
Users browsing this forum: Google [Bot], Yahoo [Bot] and 22 guests