tags:

views:

54

answers:

4

Hi, I'm trying to write a regular expression in flash that will find the word "ho" but not the words that contain this, like though, how, who, thought, etc...

I'm not asking for an explicit solution but a point in the right direction or an example would be appreciated. Thanks in advance.

+1  A: 

\b matches the boundary between a word-character (like a letter) and something else (like a space, punctuation or start/end of string).

\bho\b
bobince
Wow... after all the sites I went to, I somehow missed something as basic as that x_x. Anyway, thanks a lot lol.
Nyight
+1  A: 

One way to start is with good old google which has a ton of results for flash & regular expressions

An awesome source for regular expression info is Regular-Expressions.info which will walk you through the regex basics.

Finally, the regex you'll be looking for to match something like ho is:

\bho\b

Which means \b match a word boundary ho match the string "ho", and finally match the final word boundary \b

Gavin Miller
A: 

my pointer would be to invest in a copy of RegexBuddy - can't say enough good things about this tool

Scott Evernden