In article <y6********************@comcast.com>, Joseph Czapski
<jo**@nnnot.com> wrote:
Hi. You know that special character \b (word border) that is handy to use
because it does not eat a character that you might want to match to another
piece of your expression? \b matches the start or finish of a string of
word characters: letters, numbers, and _. Is there any way to match the
border of an arbitrary set of characters, also without eating a character?
For example, say I want to match to the beginning or end of a string of the
letters A, S, D, or F.
Your question doesn't make a lot of sense to me. The regex /[ASDF]+/
will match one or more of those characters in consecutive positions in
a string. The characters immediately before and after will not be one
of ASDF. Can you give some examples of what you are trying to match,
with some sample strings that match and some that do not?
You can use "zero-width negative lookahead (?=...) and -behind (?!...)"
assertions to customize what should precede and follow any match, if
that helps.
FYI: this newsgroup is defunct; try comp.lang.perl.misc in the future.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---