Regular expression to match a word or its prefix

Square brackets are meant for character class, and you’re actually trying to match any one of: s, |, s (again), e, a, s (again), o and n. Use parentheses instead for grouping: or non-capturing group: Note: Non-capture groups tell the engine that it doesn’t need to store the match, while the other one (capturing group does). For small stuff, either works, for ‘heavy duty’ stuff, you … Read more

Does VBA contain a comment block syntax?

Although there isn’t a syntax, you can still get close by using the built-in block comment buttons: If you’re not viewing the Edit toolbar already, right-click on the toolbar and enable the Edit toolbar: Then, select a block of code and hit the “Comment Block” button; or if it’s already commented out, use the “Uncomment … Read more

Regular expression to match a word or its prefix

Square brackets are meant for character class, and you’re actually trying to match any one of: s, |, s (again), e, a, s (again), o and n. Use parentheses instead for grouping: or non-capturing group: Note: Non-capture groups tell the engine that it doesn’t need to store the match, while the other one (capturing group does). For small stuff, either works, for ‘heavy duty’ stuff, you … Read more