Re: need help on regular expression
- From: harryooopotter@xxxxxxxxxxx (Harry)
- Date: Sun, 20 May 2012 03:14:41 GMT
Harry wrote...
I want to match a name like these,
A^Male or A^Female or
U^Male or U^Female or
D^Male or D^Female or
There may be zero, one, or more letters between the first letter [ADU]
and the ^ character.
I am using the regexp on Oracle 11, with the following expression (not
working) ...
where ... and REGEXP_LIKE(upper(column_name, '^[ADU](.)*\^FEMALE|MALE
$')
which picked up name like 'Wu...^Female'.
Yeah, I should go to oracle group ... but I hope this regular
expression thing
is not Oracle specific.
Examples without Oracle ...
Why would the following name not filtered out?
$ echo Wuxyz^Female | tr [[:lower:]] [[:upper:]] |
egrep '^[ADU](.)*\^FEMALE|MALE$'
WUXYZ^FEMALE
$ echo Wuxyz^Female | tr [[:lower:]] [[:upper:]] |
egrep '^[ADU](.)*\^FMALE|MALE$' <-- no E for FEMALE
WUXYZ^FEMALE
.
- Follow-Ups:
- Re: need help on regular expression
- From: Ed Morton
- Re: need help on regular expression
- References:
- need help on regular expression
- From: Harry
- need help on regular expression
- Prev by Date: need help on regular expression
- Next by Date: Re: need help on regular expression
- Previous by thread: need help on regular expression
- Next by thread: Re: need help on regular expression
- Index(es):
Relevant Pages
|