how to match all punctuation character in VBA regex (such as 'p{P}' in some other language)
up vote
0
down vote
favorite
I want to match all punctuation character
I know can use 'p{P}' in PHP or other languages
but, it seems not works in VBA.
I try to usepattern = "[.,x0ax21x22x24x26x27x28x29x2ax2d
x3bx3cx3ex3fx5b2x5dx5ex60x7bx7cx7dx7e]"
but I think this not a good way, Can someone give me some advice? Thank you
excel vba ms-word
add a comment |
up vote
0
down vote
favorite
I want to match all punctuation character
I know can use 'p{P}' in PHP or other languages
but, it seems not works in VBA.
I try to usepattern = "[.,x0ax21x22x24x26x27x28x29x2ax2d
x3bx3cx3ex3fx5b2x5dx5ex60x7bx7cx7dx7e]"
but I think this not a good way, Can someone give me some advice? Thank you
excel vba ms-word
Word and Excel have different "Find" functionality if you mean to search document content. So you shouldn't ask one question for the two different application interfaces. Then I recommend you research using "Find" within each application, starting with the options available in the dialog box. I don't know about Excel, but Word has extended functionality that can search specific character codes; it also has "wildcards" which is as close to RegEx as you can get in the Word interface.
– Cindy Meister
Nov 9 at 11:13
What does not working mean?
– QHarr
Nov 9 at 11:28
@CindyMeister Now the problem is that I want to match any punctuation mark, and if I use wildcards (such as[,.:;{}()]
. ), I always feel that some of punctuation mark will be missed. may be this Punctuation!
in document, then I can't find it
– Ke R.P.
Nov 10 at 15:51
Word has no way of specifying "any/all punctuation". You have to know what punctuation to inlcude... But the RegEx you show us is no different - that just lists character codes instead of literal characters.
– Cindy Meister
Nov 10 at 19:07
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to match all punctuation character
I know can use 'p{P}' in PHP or other languages
but, it seems not works in VBA.
I try to usepattern = "[.,x0ax21x22x24x26x27x28x29x2ax2d
x3bx3cx3ex3fx5b2x5dx5ex60x7bx7cx7dx7e]"
but I think this not a good way, Can someone give me some advice? Thank you
excel vba ms-word
I want to match all punctuation character
I know can use 'p{P}' in PHP or other languages
but, it seems not works in VBA.
I try to usepattern = "[.,x0ax21x22x24x26x27x28x29x2ax2d
x3bx3cx3ex3fx5b2x5dx5ex60x7bx7cx7dx7e]"
but I think this not a good way, Can someone give me some advice? Thank you
excel vba ms-word
excel vba ms-word
edited Nov 9 at 11:11
Cindy Meister
13.3k101934
13.3k101934
asked Nov 9 at 10:50
Ke R.P.
23
23
Word and Excel have different "Find" functionality if you mean to search document content. So you shouldn't ask one question for the two different application interfaces. Then I recommend you research using "Find" within each application, starting with the options available in the dialog box. I don't know about Excel, but Word has extended functionality that can search specific character codes; it also has "wildcards" which is as close to RegEx as you can get in the Word interface.
– Cindy Meister
Nov 9 at 11:13
What does not working mean?
– QHarr
Nov 9 at 11:28
@CindyMeister Now the problem is that I want to match any punctuation mark, and if I use wildcards (such as[,.:;{}()]
. ), I always feel that some of punctuation mark will be missed. may be this Punctuation!
in document, then I can't find it
– Ke R.P.
Nov 10 at 15:51
Word has no way of specifying "any/all punctuation". You have to know what punctuation to inlcude... But the RegEx you show us is no different - that just lists character codes instead of literal characters.
– Cindy Meister
Nov 10 at 19:07
add a comment |
Word and Excel have different "Find" functionality if you mean to search document content. So you shouldn't ask one question for the two different application interfaces. Then I recommend you research using "Find" within each application, starting with the options available in the dialog box. I don't know about Excel, but Word has extended functionality that can search specific character codes; it also has "wildcards" which is as close to RegEx as you can get in the Word interface.
– Cindy Meister
Nov 9 at 11:13
What does not working mean?
– QHarr
Nov 9 at 11:28
@CindyMeister Now the problem is that I want to match any punctuation mark, and if I use wildcards (such as[,.:;{}()]
. ), I always feel that some of punctuation mark will be missed. may be this Punctuation!
in document, then I can't find it
– Ke R.P.
Nov 10 at 15:51
Word has no way of specifying "any/all punctuation". You have to know what punctuation to inlcude... But the RegEx you show us is no different - that just lists character codes instead of literal characters.
– Cindy Meister
Nov 10 at 19:07
Word and Excel have different "Find" functionality if you mean to search document content. So you shouldn't ask one question for the two different application interfaces. Then I recommend you research using "Find" within each application, starting with the options available in the dialog box. I don't know about Excel, but Word has extended functionality that can search specific character codes; it also has "wildcards" which is as close to RegEx as you can get in the Word interface.
– Cindy Meister
Nov 9 at 11:13
Word and Excel have different "Find" functionality if you mean to search document content. So you shouldn't ask one question for the two different application interfaces. Then I recommend you research using "Find" within each application, starting with the options available in the dialog box. I don't know about Excel, but Word has extended functionality that can search specific character codes; it also has "wildcards" which is as close to RegEx as you can get in the Word interface.
– Cindy Meister
Nov 9 at 11:13
What does not working mean?
– QHarr
Nov 9 at 11:28
What does not working mean?
– QHarr
Nov 9 at 11:28
@CindyMeister Now the problem is that I want to match any punctuation mark, and if I use wildcards (such as
[,.:;{}()]
. ), I always feel that some of punctuation mark will be missed. may be this Punctuation !
in document, then I can't find it– Ke R.P.
Nov 10 at 15:51
@CindyMeister Now the problem is that I want to match any punctuation mark, and if I use wildcards (such as
[,.:;{}()]
. ), I always feel that some of punctuation mark will be missed. may be this Punctuation !
in document, then I can't find it– Ke R.P.
Nov 10 at 15:51
Word has no way of specifying "any/all punctuation". You have to know what punctuation to inlcude... But the RegEx you show us is no different - that just lists character codes instead of literal characters.
– Cindy Meister
Nov 10 at 19:07
Word has no way of specifying "any/all punctuation". You have to know what punctuation to inlcude... But the RegEx you show us is no different - that just lists character codes instead of literal characters.
– Cindy Meister
Nov 10 at 19:07
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224279%2fhow-to-match-all-punctuation-character-in-vba-regex-such-as-pp-in-some-oth%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Word and Excel have different "Find" functionality if you mean to search document content. So you shouldn't ask one question for the two different application interfaces. Then I recommend you research using "Find" within each application, starting with the options available in the dialog box. I don't know about Excel, but Word has extended functionality that can search specific character codes; it also has "wildcards" which is as close to RegEx as you can get in the Word interface.
– Cindy Meister
Nov 9 at 11:13
What does not working mean?
– QHarr
Nov 9 at 11:28
@CindyMeister Now the problem is that I want to match any punctuation mark, and if I use wildcards (such as
[,.:;{}()]
. ), I always feel that some of punctuation mark will be missed. may be this Punctuation!
in document, then I can't find it– Ke R.P.
Nov 10 at 15:51
Word has no way of specifying "any/all punctuation". You have to know what punctuation to inlcude... But the RegEx you show us is no different - that just lists character codes instead of literal characters.
– Cindy Meister
Nov 10 at 19:07