General questions about using TextPad
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
tcebob
- Posts: 80
- Joined: Fri Mar 28, 2003 1:20 am
Post
by tcebob »
I'd like to find the next quoted item -- any pair of quotes enclosing anything or nothing. Except for another quote, of course. My effort is:
"[[:print:]^"]+"\|""
Which doesn't work.
so, a) how to do it? and b) can \| be repeated to make more than 2 alternates?
tcebob
-
ben_josephs
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Post
by ben_josephs »
Find what: "[^"]*"
[X] Regular expression
This assumes you are using POSIX regular expression syntax:
Configuration | Preferences | Editor
[X] Use POSIX regular expression syntax
-
tcebob
- Posts: 80
- Joined: Fri Mar 28, 2003 1:20 am
Post
by tcebob »
Elegant. I thought I tried it along the way, but guess not. But. . .
Here's what happens when there's a bug in the soup:
(("non" . 0)( "end" . 1)("mid"". 2)[/code]
Starting after "end" the next hit is the "" after mid. Why do you suppose it skips over "mid"?
Thanks,
tcebob
-
Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
-
Contact:
Post
by Bob Hansen »
Works OK for me, I get three hits:
"non"
"end"
"mid"
But I need to move off the selection before searching for the next one or else I get six hits:
"non"
" . 0)( "
"end"
" . 1)("
"mid"
""
Hope this was helpful.............good luck,
Bob