John W. Krahn wrote:
FlashMX wrote:

I need to modify some existing code. The below line checks a file I'm
reading in and does a search/replace based on the match. Currently
I'm looking for...

if (/00000 set/) { ...etc.

Because the "000000" can change to different numbers (but always 6
figures which could include a period) how can I do a wildcard search?

For example I also need to search for ".00000". Or it could also be
".45306" or "123456" etc.

if (/WILDCARD set/) { ...etc.

If the decimal point will always be at the beginning of the number:

/(?:\.\d{5}|\d{6}) set/

Or:

/[.\d]\d{5} set/



John
--
use Perl;
program
fulfillment

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to