0

I want to match a full line containing a word, say its 'josh'

"^13*<josh>[!^13]@^13" 

doesnt match anything in my document:

Josh

Joshd

adf Josh

fffJoshfff

Community
  • 1
  • 1
JoshDG
  • 3,871
  • 10
  • 51
  • 85

1 Answers1

0

You have to check the wildcards option in the UI, or set .MatchWIldCards in the Find object if you are in VBA. Even then,

  • Word's "regex" is not the same as "real regex"
  • You won't get "lines" but "paragraphs" using ^13
  • I think you will get more than you want with that initial "^13*". The following may work better - can't be sure.

    ^13[!^13]@[!^13]@^13