Forum Moderators: coopster
so generally the inc file is called
c=X.inc
where X is an integer. But sometimes it has
c=X&S=Y
where y is also an interger.
I could run the delete function twice but that seems like a waste of processing
So with just one:
$c = X
c=*.inc works a treat and with two:
$c = X
$s = Y
c=$c&s=*.inc
Is there a way of combining the two into one regex
Cheers
<added>
forget to say the bit that is getting me is the possibility of deleting both 3 and 33 for example when I only wanted 3 to be nuked
</added>
possibility of deleting both 3 and 33 for example when I only wanted 3 to be nuked
\d - matches one digit
\d+ - one or more digit
\d* - zero or more digits
[^\d]* - all text up to the digit
([^\d]*)(\d)(.*) - all text up to the digit in one group and the digit in the next group and everything else in the last group. So with var3comment, the replacement group '$1 = $2; # $3' yields "var = 3; #comment"
If you want to fiddle around, there is a great online regex tester at
[fileformat.info...]