![]() |
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 |
| Regular expression Help | Harikrishna | Shell Programming and Scripting | 3 | 06-11-2008 08:20 AM |
| regular expression help pls | miwinter | UNIX for Dummies Questions & Answers | 3 | 06-05-2008 01:14 AM |
| Regular expression | maxvirrozeito | UNIX for Dummies Questions & Answers | 1 | 12-14-2007 08:02 AM |
| Need help in Regular Expression | mahabunta | UNIX for Dummies Questions & Answers | 2 | 09-26-2006 05:11 PM |
| Regular Expression + Aritmetical Expression | Z0mby | Shell Programming and Scripting | 2 | 05-21-2002 10:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Regular Expression Help
Hi there,
I have a line in a coded text from which the formtat is Code:
DEF/AAA/AAA/AAA/AAA/AAA/AAA/AAA/AAA/AAA but the fields after the DEF/ are optional. Which means the line could look like Code:
DEF/AAA or DEF/AAA/AAA etc etc Is it possible to make this is one regular expression or I should use "OR" and do sth like Code:
DEF/(BCD|DFG)||DEF/.../(BCD|DFG) etc etc |
|
||||
|
I was mistaken. It doesn't work. If there is not BCD or DFG in the line and the line starts with DEF/ it matches is as well.
Eg. I tried this Code:
DEF/AAA/AAA/AAA/AAA/AAA/AAA How I can correct this?? |
|
||||
|
Thanks for your answer but the problem is that I have to use the regular expression in an xml so I can't use grep.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|