How replace * character with what it's found
up vote
0
down vote
favorite
I can't find specifically what I'm looking for, possibly because it's not possible. Essentially, I want to find capitalised words and replace them with the capitalised word followed by a carriage break.
I was thinking something along the lines of ([A-Z])*([A-Z]) = /1/2/3^p
, but I get an error message saying there's a number out of range and any other way I've tried ends up basically replacing with only the first and last letter intact.
Is there any hope?
microsoft-word find-and-replace
add a comment |
up vote
0
down vote
favorite
I can't find specifically what I'm looking for, possibly because it's not possible. Essentially, I want to find capitalised words and replace them with the capitalised word followed by a carriage break.
I was thinking something along the lines of ([A-Z])*([A-Z]) = /1/2/3^p
, but I get an error message saying there's a number out of range and any other way I've tried ends up basically replacing with only the first and last letter intact.
Is there any hope?
microsoft-word find-and-replace
You have tagged only two fields, with(...)
, so3
is out of range. I haven't time to check, but, assuming that Word handles the full range of regular expressions, then all you need is([A-Z]*[A-Z])
->1^p
, where1
refers to the whole of the string matched. Greedy matching makes sure that the whole word is matched, though a string likeABC123DEF
will be replaced as you may or may not wish.
– AFH
Nov 21 at 20:00
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I can't find specifically what I'm looking for, possibly because it's not possible. Essentially, I want to find capitalised words and replace them with the capitalised word followed by a carriage break.
I was thinking something along the lines of ([A-Z])*([A-Z]) = /1/2/3^p
, but I get an error message saying there's a number out of range and any other way I've tried ends up basically replacing with only the first and last letter intact.
Is there any hope?
microsoft-word find-and-replace
I can't find specifically what I'm looking for, possibly because it's not possible. Essentially, I want to find capitalised words and replace them with the capitalised word followed by a carriage break.
I was thinking something along the lines of ([A-Z])*([A-Z]) = /1/2/3^p
, but I get an error message saying there's a number out of range and any other way I've tried ends up basically replacing with only the first and last letter intact.
Is there any hope?
microsoft-word find-and-replace
microsoft-word find-and-replace
edited Nov 21 at 19:38
Toto
3,32191125
3,32191125
asked Nov 21 at 19:26
Francesca Elena Pieri
1
1
You have tagged only two fields, with(...)
, so3
is out of range. I haven't time to check, but, assuming that Word handles the full range of regular expressions, then all you need is([A-Z]*[A-Z])
->1^p
, where1
refers to the whole of the string matched. Greedy matching makes sure that the whole word is matched, though a string likeABC123DEF
will be replaced as you may or may not wish.
– AFH
Nov 21 at 20:00
add a comment |
You have tagged only two fields, with(...)
, so3
is out of range. I haven't time to check, but, assuming that Word handles the full range of regular expressions, then all you need is([A-Z]*[A-Z])
->1^p
, where1
refers to the whole of the string matched. Greedy matching makes sure that the whole word is matched, though a string likeABC123DEF
will be replaced as you may or may not wish.
– AFH
Nov 21 at 20:00
You have tagged only two fields, with
(...)
, so 3
is out of range. I haven't time to check, but, assuming that Word handles the full range of regular expressions, then all you need is ([A-Z]*[A-Z])
-> 1^p
, where 1
refers to the whole of the string matched. Greedy matching makes sure that the whole word is matched, though a string like ABC123DEF
will be replaced as you may or may not wish.– AFH
Nov 21 at 20:00
You have tagged only two fields, with
(...)
, so 3
is out of range. I haven't time to check, but, assuming that Word handles the full range of regular expressions, then all you need is ([A-Z]*[A-Z])
-> 1^p
, where 1
refers to the whole of the string matched. Greedy matching makes sure that the whole word is matched, though a string like ABC123DEF
will be replaced as you may or may not wish.– AFH
Nov 21 at 20:00
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You are getting the error because you have only 2-sets of parentheses marking logical strings in your Find statement ([A-Z])*([A-Z])
and in your Replace statement /1/2/3^p
you are saying there are three sets.
If you want to leave your Replace statement as is, then change the Find statement to ([A-Z])(*)([A-Z])
. Although, you might not really be happy with the results it returns, but try it and see if that's what you want. It is going to return multiple words due to the inclusion of the *
wildcard.
A better Find statement for locating all capitalized words is: <([A-Z]{2,10})>
The left and right arrow wildcards direct the find to locate only words that start with the included criteria. The control field with curly brackets tell the Find that there must be at a minimum 2 characters and a maximum of 10 (I just randomly picked 10 as the max, you can set it to anything) of the preceding criteria. Using this wildcard Find statement, the Replace statement should be /1^p
.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You are getting the error because you have only 2-sets of parentheses marking logical strings in your Find statement ([A-Z])*([A-Z])
and in your Replace statement /1/2/3^p
you are saying there are three sets.
If you want to leave your Replace statement as is, then change the Find statement to ([A-Z])(*)([A-Z])
. Although, you might not really be happy with the results it returns, but try it and see if that's what you want. It is going to return multiple words due to the inclusion of the *
wildcard.
A better Find statement for locating all capitalized words is: <([A-Z]{2,10})>
The left and right arrow wildcards direct the find to locate only words that start with the included criteria. The control field with curly brackets tell the Find that there must be at a minimum 2 characters and a maximum of 10 (I just randomly picked 10 as the max, you can set it to anything) of the preceding criteria. Using this wildcard Find statement, the Replace statement should be /1^p
.
add a comment |
up vote
0
down vote
You are getting the error because you have only 2-sets of parentheses marking logical strings in your Find statement ([A-Z])*([A-Z])
and in your Replace statement /1/2/3^p
you are saying there are three sets.
If you want to leave your Replace statement as is, then change the Find statement to ([A-Z])(*)([A-Z])
. Although, you might not really be happy with the results it returns, but try it and see if that's what you want. It is going to return multiple words due to the inclusion of the *
wildcard.
A better Find statement for locating all capitalized words is: <([A-Z]{2,10})>
The left and right arrow wildcards direct the find to locate only words that start with the included criteria. The control field with curly brackets tell the Find that there must be at a minimum 2 characters and a maximum of 10 (I just randomly picked 10 as the max, you can set it to anything) of the preceding criteria. Using this wildcard Find statement, the Replace statement should be /1^p
.
add a comment |
up vote
0
down vote
up vote
0
down vote
You are getting the error because you have only 2-sets of parentheses marking logical strings in your Find statement ([A-Z])*([A-Z])
and in your Replace statement /1/2/3^p
you are saying there are three sets.
If you want to leave your Replace statement as is, then change the Find statement to ([A-Z])(*)([A-Z])
. Although, you might not really be happy with the results it returns, but try it and see if that's what you want. It is going to return multiple words due to the inclusion of the *
wildcard.
A better Find statement for locating all capitalized words is: <([A-Z]{2,10})>
The left and right arrow wildcards direct the find to locate only words that start with the included criteria. The control field with curly brackets tell the Find that there must be at a minimum 2 characters and a maximum of 10 (I just randomly picked 10 as the max, you can set it to anything) of the preceding criteria. Using this wildcard Find statement, the Replace statement should be /1^p
.
You are getting the error because you have only 2-sets of parentheses marking logical strings in your Find statement ([A-Z])*([A-Z])
and in your Replace statement /1/2/3^p
you are saying there are three sets.
If you want to leave your Replace statement as is, then change the Find statement to ([A-Z])(*)([A-Z])
. Although, you might not really be happy with the results it returns, but try it and see if that's what you want. It is going to return multiple words due to the inclusion of the *
wildcard.
A better Find statement for locating all capitalized words is: <([A-Z]{2,10})>
The left and right arrow wildcards direct the find to locate only words that start with the included criteria. The control field with curly brackets tell the Find that there must be at a minimum 2 characters and a maximum of 10 (I just randomly picked 10 as the max, you can set it to anything) of the preceding criteria. Using this wildcard Find statement, the Replace statement should be /1^p
.
answered Nov 22 at 11:50
Rich Michaels
1,0842210
1,0842210
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2fsuperuser.com%2fquestions%2f1377395%2fhow-replace-character-with-what-its-found%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
You have tagged only two fields, with
(...)
, so3
is out of range. I haven't time to check, but, assuming that Word handles the full range of regular expressions, then all you need is([A-Z]*[A-Z])
->1^p
, where1
refers to the whole of the string matched. Greedy matching makes sure that the whole word is matched, though a string likeABC123DEF
will be replaced as you may or may not wish.– AFH
Nov 21 at 20:00