Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2024, 12:48 PM
IndianaITGuy IndianaITGuy is offline Finding string at end of line Windows 11 Finding string at end of line Office 2019
Novice
Finding string at end of line
 
Join Date: Mar 2024
Location: Martinsville, IN
Posts: 25
IndianaITGuy is on a distinguished road
Default Finding string at end of line

Given:
Y1.571
X-20.3033 Z7.802 F80. A-.761 C-90.
X-19.7012 Z7.7895 A-1.525 C-93.776
X-19.0993 Z7.769 A-2.288
X-18.4977 Z7.7405 A-3.051
X-17.8965 Z7.704 A-3.813


X-17.296 Z7.6596 A-4.576
X-16.6961 Z7.6072 A-5.339

I'm trying to isolate any string alone on on a line. I always thought that a line ends with either a paragraph marker ^p or a ^l . When I attempt to do a search for either a string at the end of line or just the end of line character itself, the search fails. In fact, searching for a ^p yields the following error message: "^p is not a special character for the Find What box or is not supported when the Use Wildcards check box is selected."

What's going on? Other references speak of being able to use ^p. Has something changed? I used to use it myself.
Reply With Quote
  #2  
Old 03-26-2024, 12:55 PM
Italophile Italophile is offline Finding string at end of line Windows 11 Finding string at end of line Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by IndianaITGuy View Post
In fact, searching for a ^p yields the following error message: "^p is not a special character for the Find What box or is not supported when the Use Wildcards check box is selected."

What's going on? Other references speak of being able to use ^p. Has something changed? I used to use it myself.
Re-read the message. It tells you precisely what the problem is.
Reply With Quote
  #3  
Old 03-26-2024, 01:13 PM
IndianaITGuy IndianaITGuy is offline Finding string at end of line Windows 11 Finding string at end of line Office 2019
Novice
Finding string at end of line
 
Join Date: Mar 2024
Location: Martinsville, IN
Posts: 25
IndianaITGuy is on a distinguished road
Default

I could have sworn I tried that and it didn't work. Thanks again.
Reply With Quote
  #4  
Old 03-31-2024, 02:14 PM
TessaMurillo TessaMurillo is offline Finding string at end of line Windows Vista Finding string at end of line Office 2010
Advanced Beginner
 
Join Date: Mar 2024
Posts: 33
TessaMurillo has a little shameless behaviour in the past
Default

This could possibly be due to your document settings or the version of Word you are using. It is possible that your version of Word may have a change in how the paragraph marker (^p) is handled or how it is treated within search. Alternatively, try using other special characters such as end of line (^l) or end of paragraph (¶) to search for paragraphs in your document.
Reply With Quote
  #5  
Old 04-01-2024, 11:02 AM
IndianaITGuy IndianaITGuy is offline Finding string at end of line Windows 11 Finding string at end of line Office 2019
Novice
Finding string at end of line
 
Join Date: Mar 2024
Location: Martinsville, IN
Posts: 25
IndianaITGuy is on a distinguished road
Default

Nah I just read that I cannot search for a ^p. It has to be a chr(13) or something.
Reply With Quote
  #6  
Old 04-02-2024, 02:58 AM
gmaxey gmaxey is offline Finding string at end of line Windows 10 Finding string at end of line Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

You can search for ^p if the Match Wild Cards attribute is set to false.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #7  
Old 04-02-2024, 04:55 AM
IndianaITGuy IndianaITGuy is offline Finding string at end of line Windows 11 Finding string at end of line Office 2019
Novice
Finding string at end of line
 
Join Date: Mar 2024
Location: Martinsville, IN
Posts: 25
IndianaITGuy is on a distinguished road
Default

Yes but can you search for a mixed string that includes ^p and other wildcards with the Match Wild Cards set to false, e.g. "X*Y*^p"?
Reply With Quote
  #8  
Old 04-02-2024, 05:03 AM
gmaxey gmaxey is offline Finding string at end of line Windows 10 Finding string at end of line Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

No, the wildcard characters e.g., *, {, ] etc. are treated as literal characters if Match Wild Cards is set to false.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #9  
Old 04-06-2024, 04:15 AM
Boris_R Boris_R is offline Finding string at end of line Windows Vista Finding string at end of line Office 2010 32bit
Novice
 
Join Date: Oct 2015
Posts: 6
Boris_R is on a distinguished road
Default

You can use ^013 instead of ^p when using wildcards.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Establish a new range after finding a string RobiNew Word VBA 4 12-16-2023 01:54 AM
Subscript out of Range Error when searched for string and its line number in Text File SamDsouza Word VBA 4 01-12-2021 07:08 PM
Finding string at end of line finding a string containing a combination of formats and adding text before Marco Word VBA 1 11-02-2015 05:08 PM
Finding string at end of line search for string, wherever found, at end of line, insert 8 <cr>s sbktex Word VBA 2 09-17-2014 04:09 PM
Finding string at end of line Replace paragraph-marks (line-breaks) in tables with a character-string Aztec Word VBA 2 04-02-2013 10:52 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft