Parola jolly Cerca e sostituisci elementi formula


0

(v n = v p = 0)

Qualcuno sa se è possibile cercare e sostituire in Word, usando i caratteri jolly, per mettere in corsivo la v n = v p ?

Inoltre, la stessa ricerca e sostituzione, ma v 1 = v p , con i numeri dei pedici non in corsivo.

Grazie per tutte le risposte e le soluzioni.

Peter

Risposte:


0

Sì, è possibile.

La sintassi esatta dipende dal carattere jolly desiderato; ecco un esempio in cui le v potrebbero essere qualsiasi lettera:

inserisci qui la descrizione dell'immagine

I punti interrogativi rappresentano una singola lettera e nella stringa di sostituzione vengono reinseriti come \1per la prima e \2per la seconda, quindi qualunque carattere fosse presente rimarrà. Nota che il formato target è 'Corsivo', quindi qualunque sia il loro formato, saranno Corsivo dopo la sostituzione.

Utilizzando le caratteristiche che ware elencati nelle Formate Specialmenu a discesa, si può costruire quello che vi serve. Nota che i menu a discesa sono sensibili alla posizione del cursore - campo sorgente o target - e mostrano rispettivamente diverse opzioni.


0

Per la tua seconda domanda, rimuovere il corsivo solo dai numeri dei pedici

inserisci qui la descrizione dell'immagine

Esaminerei ogni modifica (Trova successivo) e la sostituissi una alla volta (Sostituisci) anziché (Sostituisci tutto), per essere sicuro al 100% di non modificare nient'altro in pedice.


0

Penso che questo sia di gran lunga il miglior riferimento che ho trovato fino ad oggi: link .


[ecco il testo del sito Web originale nel caso in cui il link diventi non valido.]

Riferimenti (menzionati nel link):

"Find and replace text and other data in a Word document" @ https://support.office.com/en-us/article/find-and-replace-text-and-other-data-in-a-word-document-c6728c16-469e-43cd-afe4-7708c6c779b7.
"Finding and replacing characters using wildcards" @ https://wordmvp.com/FAQs/General/UsingWildcards.htm.

Trova, sostituisci e vai e i relativi tasti di scelta rapida Tasto di scelta rapida Funzioni Trova Ctrl-F Trova testi (nel riquadro "Navigazione") Sostituisci Ctrl-H Trova e sostituisci testi Fai clic su "Altro" per visualizzare le "Opzioni di ricerca", ad esempio "Caso di corrispondenza "," Trova solo parole intere "," Usa caratteri jolly "ed ecc." Usa caratteri jolly "supporta l'espressione regolare (regex). Vai a Ctrl-G Simile a "Trova", ma ti consente di cercare oggetti non testuali come grafici, titoli, campi, equazioni, ecc. Trova / sostituisci motivi e caratteri speciali usando i codici cursore ^ codice

Word consente di trovare / sostituire modelli di testo utilizzando i codici sotto forma di ^ codice. Questi codici sono univoci per Word.

Per controllare questi codici: Ctrl-H ⇒ scheda "Sostituisci" ⇒ Posiziona il cursore all'interno del campo "Trova cosa" o "Sostituisci con" ⇒ Altro ⇒ Speciale ⇒ scegli l'elemento desiderato per generare il ^ codice.

Questi codici possono essere utilizzati nei campi "Trova cosa" e "Sostituisci con":

^p (Parallel Mark or Newline)(or ^13); ^l (Manual Line Break)(or ^11); ^t (Tab)(or ^9)
^^ (Caret - to resolve ambiguity)
^w (White Space - space or tab)
^nnn (ASCII character in decimal), ^0nnn (ANSI character)

Questi codici possono essere utilizzati in "Trova con":

^? (Any Character); ^# (Any Digit); ^$ (Any Letter)
^g (Graphics)

Puoi utilizzare questi codici nel campo "Sostituisci con":

^& ("Find What" result text)
^c (Clipboard Content)

Per esempio:

"Find what" code: ^#^#%
"Find what" meaning: two digits followed by %.
"Replace with" code: --^&--
Choose "Replace" or "Replace All"
Result: Enclose (next or all) two-digit percent by -- and --.
[TODO]

Trova / Sostituisci con espressione regolare (Regex) o caratteri jolly

Word supporta trova / sostituisci con la propria variante di espressioni regolari (regex), che si chiama jolly.

Per usare regex: Ctrl-H (Trova / Sostituisci) ⇒ Seleziona l'opzione "Usa caratteri jolly" sotto "Altro".

Leggi "Regular Expression (Regex)" per la sintassi di Regex. Word supporta regex nel suo modo unico!

Una regex è un modello che corrisponde a una serie di stringhe di testo. Un modello regex elementare corrisponde a un singolo carattere, come segue:

Any letter, digit and most of the special characters matches itself. For example, a match a; 9 matches 9; % matches %. In word, the matching is case sensitive, i.e., x matches x but not X. Take note that Word supports Unicode characters in search too.
These special characters have a special meaning: [ ] { } < > ( ) - @ ? ! * \. To match these characters, prepend with the escape character \. For example, \< matches <; \@ matches @.
^nnn: match the ASCII character having decimal number nnn. For example, ^13 matches newline; ^9 matches tab; ^65 matches A; ^97 matches a. This is not standard regex.

Una regex per la corrispondenza di una stringa di testo (una sequenza di caratteri) consiste in una sequenza di sottotitoli (o sottoespressioni), ad esempio, xyz corrisponde a xyz; 12345 partite 12345; \ partite

.

È possibile utilizzare questi caratteri jolly in corrispondenza:

?: matches any single character, including space and punctuation characters. For example, ab?de matches abade, abbde, abXde, etc. (This is not a standard regex and is unique to Word. Standard regex uses dot (.) which matches any single character other than newline).
*: matches any sequence of characters, including space and special characters. For example, a*t matches art, aXXt, a@^@t, a t, etc. (This is not a standard regex, which uses .*)
[ ]: matches one (single) of the characters enclosed (i.e., OR), e.g., [aeiou] matches a, e, i, o or u.
[ - ]: matches any single character in this range, e.g., [a-z] matches any (single) lowercase letter; [a-z0-9] matches any (single) lowercase letter or digit.
[! ]: NOT one of the characters enclosed. For example, [!aeiou] matches any (single) character other than a, e, i, o or u. (This is not standard regex, which uses caret (^).)
{n}, {m,n}, {n,}: occurrence indicators for n, m-to-n, and n-or-more occurrences. For example, abc{2} matches abcabc; ab{2-3} matches abab or ababab.
@: occurrence indicators for one or more occurrences, same as {1,}. For example, abc@de matches abcde, abcabdde, abcabcabcde, etc. (Standard regex uses +. Word does not support * (zero or more), ? (zero or one) used in standard regex. Word also does not support {0,} and {0,1} which is probably a bug?!?!).
<, >: Positional Anchors matching the beginning or ending of a word boundary. For example, <pre matches any word beginning with pre; <apple> matches the word apple; ing> matches any word ending with ing.
( ): Parenthese can be used for two purposes:
    Grouping sub-patterns: e.g., (abc){2} matches abcabc, but abc{2} matches abcc.
    back references: They have no effect in "find" but divide the match result into sub-matches, identified as \1, \2, \3, etc, where \1 is the matched content of the first set of parentheses. For example, <*> <*> matches two words separated by a space without back references. You can set back references using parenthese in this form (<*>) (<*>) to "mark" the two matched words. You can refer to the resultant content of the first matched word as \1, and second word as \2. See more example below.
Word uses "lazy" matching, i.e., it quits matching as soon as the shortest match is found. For examples, xy{2,4} tries to match xyy, then xyyy, and then xyyyy in lazy matching. On the other hand, most Unix tools and programming languages use "greedy" matching to get the longest match.

Per esempio:

Objective: Swap two words
"Find what" regex: (<*>) (<*>)
"Find what" meaning: two complete words separated by a space, marked by two parenthesized back references \1 and \2.
"Replace with" regex: \2 \1
"Replace with" meaning: \1, \2 denoted the first and second matched back references.
Choose "Replace" (next 2 words) or "Replace All" (all two consecutive words).
"Find what" regex: ([! ]@)^13
"Find what" meaning: one or more non-space before the paragraph mark - matches the last word or partial word at the end of the paragraph marked by parenthezied back reference \1. This is slightly different from (<*>)^13, which matches a complete word at the end of the paragraph.
Objective: Transposing date from the form "28th March 2018" to the form "March 28, 2018"
"Find what" regex: ([0-9]{1,2})([dhnrst]{2}) (<[ADFJMNOS]*>) ([0-9]{4})
"Replace with" regex: \3 \1, \4
Objective: Transposing date from the form "28/03/2018" to "2018/03/28"
"Find what" regex: ([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})
"Replace with": \3/\1/\2
Objective: Remove empty rows
"Find what" regex: (^13)\1@
"Find what" meaning: Two or more consecutive paragraph marks. Take note that you can use back references in "Find with".
"Replace with" regex: ^p
"Replace with" meaning: In word, you can use ^p in "Replace with", but NOT in "Find what". You need to use ^13 in "Find what".

Trova immagini, tabella, commenti e altri oggetti

Premi Ctrl-F per visualizzare il riquadro "Navigazione" ⇒ Fai clic sulla freccia giù in "Cerca documento" ⇒ Puoi scegliere "Grafica", "Tabelle", "Equazioni", "Note a piè di pagina / Note di chiusura" o "Commenti". Vai a una pagina, una tabella, un'intestazione o un altro elemento specifici

Ctrl-G (Vai a) ⇒ In "Vai a cosa", scegli il tipo di elementi come "Grafica", "Tabelle", "Intestazioni", "Campi", "Equazioni", "Oggetti", ecc. Trova / Sostituisci formattazione specifica

Ctrl-H (Trova / Sostituisci) ⇒ Trova o Sostituisci scheda ⇒ Altro ⇒ Formato ⇒ Puoi scegliere varie formattazioni come "Carattere", "Paragrafo", "Stile", ecc. ⇒ Inserisci il testo (opzionale).

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.