Hi All,
While converting an old code, I encountered the following problem.
Given an HTML string,
<Font face="Arial" size="21" color="#000000">
THIS IS SIZE 21
</Font>
I want to subtract a factor "X" from the size "21" in the output string by using Regex?
So the new string be
<Font face="Arial" size="(21-X)" color="#000000">
THIS IS SIZE (21-X)
</Font>
Example
Original String
<Font face="Arial" size="21" color="#000000">
THIS IS SIZE 21
</Font>
and factor = 8 (so subtract 8 from size ..so new size = 21- 8 =13 )
Output String
<Font face="Arial" size="13" color="#000000">
THIS IS SIZE 13
</Font>
Can this type of processing be done using Regex. Something similar to match evaluator in C#
Whats the best way to do this sort of conversions??