PDA

View Full Version : [SOLVED:] help at Wildcards



Ethen5155
01-17-2017, 01:54 AM
Hi all,

well i just need a simple help for find/replace in wildcards at Word


i have a file contains English,numbers and non English words i need to find (space) between any Number [0-9] and English characters [A-Za-z]

for ex,

18049


also i need to find the whole line starts with any English character and ends with any number

for ex,

18051



Thanks

Ethen

macropod
01-17-2017, 03:14 AM
i have a file contains English,numbers and non English words i need to find (space) between any Number [0-9] and English characters [A-Za-z]
That can be done with a wildcard Find:
Find = [0-9][ ^s][A-Za-z]
or:
Find = [A-Za-z][ ^s][0-9]
depending on which comes first - the letter or the number. Since you don't say what you want to do with the found text, there's nothing much more I can add on that front.

also i need to find the whole line starts with any English character and ends with any number
Unless those lines begin a paragraph or a line preceded by a manual line break and are terminated with a paragraph break or manual line break, it can't be done via a Find and, with a macro, the results could vary from one computer to the next, depending on what the active printer driver is.

Ethen5155
01-17-2017, 03:29 AM
That can be done with a wildcard Find:
Find = [0-9][ ^s][A-Za-z]
or:
Find = [A-Za-z][ ^s][0-9]
depending on which comes first - the letter or the number. Since you don't say what you want to do with the found text, there's nothing much more I can add on that front.



Thanks a lot for this, works fine




Unless those lines begin a paragraph or a line preceded by a manual line break and are terminated with a paragraph break or manual line break, it can't be done via a Find and, with a macro, the results could vary from one computer to the next, depending on what the active printer driver is.


that means if that line existed at (first,last or between) paragraph text and i want to select it only, that can't be done??



Cheers

Ethen

macropod
01-17-2017, 03:35 AM
that means if that line existed at (first,last or between) paragraph text and i want to select it only, that can't be done??
Not via Find if there are other lines in the same paragraph and your text is not both preceded by and followed by a paragraph break or manual line break. And, as I said, the results you'd get from a macro could vary from one computer to the next.

Ethen5155
01-17-2017, 03:37 AM
Hi Paul,

sorry i think i explained it not detailed about first wildcards code, i just want to find (Space) only between characters and numbers

Character+Space+Number --> Yes


not Character+Space+Number --> No


is it possible?


Cheers

Ethen

macropod
01-17-2017, 06:03 AM
i just want to find (Space) only between characters and numbers

Character+Space+Number --> Yes


not Character+Space+Number --> No
To me, aside from the strange formatting you've used, those both look to be the same and is precisely what you get with:
Find = [A-Za-z][ ^s][0-9]