in reply to Re^4: match whitespace or beginning/end of string
in thread match whitespace or beginning/end of string

I, for one, always prefer "simple" (or "simpler"). But, it seems to me, that "simpler" is not always compatible with the demands of the situation.

It seems to me (not that I'm by any means really qualified to make this assertion) that the situation you're addressing is, by its nature, not easily handled by anything "simple". In my experience this is espeically true (or perhaps I should say "tends to be true"...I guess it depends upon one's familiarity and accumen with regexs) when regexs are involved.

I think the strategy that gmargo proposed is elegantly "simple" in terms of regexs and I, like gmargo, am not sure why it wouldn't work for cases other than just for 'beta'.

At the end of the day, I guess I don't know what you're imagining is "simple" or "simpler". But that's probably just my misunderstanding of what you're looking for.

ack Albuquerque, NM
  • Comment on Re^5: match whitespace or beginning/end of string

Replies are listed 'Best First'.
Re^6: match whitespace or beginning/end of string
by azadian (Sexton) on Nov 02, 2009 at 15:16 UTC
    My guess is that anything more complicated than \b is going to be too much to ask of my users. \b and \s do not work if the substring is at the beginning of the string. The more complicated it is, they less likely they are to use my wonderful tool.