![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with finding & replacing pattern in a file | dusoo | Shell Programming and Scripting | 0 | 05-23-2008 03:59 AM |
| finding duplicate files by size and finding pattern matching and its count | jerome Sukumar | Shell Programming and Scripting | 2 | 12-01-2006 04:20 AM |
| Pattern Recognition - perl | scorreg | UNIX for Dummies Questions & Answers | 3 | 09-23-2006 09:41 AM |
| Finding pattern & prepending a line with text | kirrushna | Shell Programming and Scripting | 1 | 07-11-2006 02:20 AM |
| Finding a specific pattern from thousands of files ???? | aarora_98 | Shell Programming and Scripting | 6 | 02-17-2006 08:28 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Perl: finding pattern and substituting
In Perl, I know pattern matching is something like, $name =~ /xxxxxx/;
If I find pattern matching using regular expression, how do I substitute it with real string? For example, I need to find pattern, /-\d\d\d\d/, which is something like "-2000", but those 4 digits can be any numbers. Now, I need to replace those numbers with "-<certain 4 digit number>". Is there a way to do it in Perl? Thank a bunch in advance!!! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|