|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
should I look at a manual.
![]() I got a couple basic regular expressions I need for a small script and I don't wanna wait till I learn a bunch of regular expressions. I've begun reading http://www.regular-expressions.info/ which seems like a pretty good guide. But haven't learned enough yet apparently and like to get this script done. I need three regular expression searches: (n) (v) (adv) Now I understand special characters need to be preceded with a / but /(n/) isn't working why? please if ya can. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Mar 25, 4:11pm, "Dirk.R.Gen...@gmail.com"
<Dirk.R.Gen...@gmail.com> wrote: > should I look at a manual. ![]() > > I got a couple basic regular expressions I need for a small script and > I don't wanna wait till I learn a bunch of regular expressions. I've > begun reading > > http://www.regular-expressions.info/ > > which seems like a pretty good guide. But haven't learned enough yet > apparently and like to get this script done. > > I need three regular expression searches: > > (n) > (v) > (adv) > > Now I understand special characters need to be preceded with a / but > > /(n/) isn't working > > why? > > please if ya can. \(n\) .... |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"Dirk.R.Gently@gmail.com" <Dirk.R.Gently@gmail.com> writes:
> Now I understand special characters need to be preceded with a / but You mean \ - not / |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Mar 25, 3:33 pm, Maxwell Lol <nos...@com.invalid> wrote:
> "Dirk.R.Gen...@gmail.com" <Dirk.R.Gen...@gmail.com> writes: > > Now I understand special characters need to be preceded with a / but > > You mean \ - not / lol thanks for the guys. I must be dyslexic ![]() |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On 3/25/2008 4:25 PM, Dirk.R.Gently@gmail.com wrote: > On Mar 25, 3:33 pm, Maxwell Lol <nos...@com.invalid> wrote: > >>"Dirk.R.Gen...@gmail.com" <Dirk.R.Gen...@gmail.com> writes: >> >>>Now I understand special characters need to be preceded with a / but >> >>You mean \ - not / > > > lol thanks for the guys. I must be dyslexic ![]() Just be aware that different tools support different RE specifications and you can't always use REs instead of strings. For example: sed uses Basic REs or Extended REs depending on tool version and options given. grep uses Basic REs, Extended REs, or Perl REs depending on tool version and options given. awk uses Extended REs but only in conditions and some functions and some ERE functionality must be explicitly enabled with options for backward compatibility. perl, presumably, uses Perl REs.... etc...... So when asking any question about REs, it's usually important to say what type of RE you're interested in and/or which tool you're using. For a general RE reference, I like http://www.opengroup.org/onlinepubs/...99/xbd/re.html. Ed. |
|
![]() |
| Outils de la discussion | |
|
|