Quote:
Originally Posted by yamusing
thanks it seems to work for the first field but the others tag fields in my other books aren't working
test: "5-glass, apple, group:95#TR4, Hefine94, weight:140lbs (acc), Z97-A.5"
result: "weight:140lbs (acc)"
test: "case:AR5steel, group:Fractal-group, heavy, T*m5%, weight:@eightySix'Kilos"
result: "case:AR5steel, group:Fractal-group, heavy, T*m5%, weight:@eightySix'Kilos"
test: case:AR5steel, light, group:Fractal-group, weight:@seventyOne'Kilos, Xeon, ZRX0, ZRX4"
result: "weight:@seventyOne'Kilos, Xeon, ZRX0"
|
The regular expression needs to account for the position of the desired field in the string. which can be first, middle, or last. For example:
Code:
^(.*?, *|)(weight:.+?|)(,.*?|)$
The above expression doesn't work if there isn't a "weight:...." tag somewhere in the list.
I leave it to you to figure out how to change the expression you use to delete the tag from the tag set. The change will be similar.