source/text/swriter/guide/search_regexp.xhp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
New commits: commit e3caa53e99709b7099611b67cf73e9bdbd8801ea Author: Pierre F <f...@bger.ch> AuthorDate: Wed Aug 7 12:05:39 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Aug 23 22:05:26 2024 +0200 more (simple) regex examples + fix note on paragraph limitation. tdf#38261, tdf#159607 Change-Id: Ib96d4d8a4cef38bd90e33672f0d7c4445b2cd2fe Reviewed-on: https://gerrit.libreoffice.org/c/help/+/171538 Tested-by: Jenkins Reviewed-by: Pierre F <f...@bger.ch> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/source/text/swriter/guide/search_regexp.xhp b/source/text/swriter/guide/search_regexp.xhp index d1a82ba302..e2f94ae306 100644 --- a/source/text/swriter/guide/search_regexp.xhp +++ b/source/text/swriter/guide/search_regexp.xhp @@ -35,7 +35,7 @@ <bookmark_value>paragraph marks;searching</bookmark_value> </bookmark> <h1 id="hd_id3150099"><variable id="search_regexp"><link href="text/swriter/guide/search_regexp.xhp">Using Regular Expressions in Text Searches</link></variable></h1> - <paragraph xml-lang="en-US" id="par_id0509200916345516" role="paragraph">Regular expressions can be used to search for some unspecified or even invisible characters.</paragraph> + <paragraph xml-lang="en-US" id="par_id0509200916345516" role="paragraph">Regular expressions are special patterns used to find and manipulate text, helping you locate specific information within texts.</paragraph> <note id="par_id421554926388821">Searching with regular expressions is different from searching with wildcards. %PRODUCTNAME Writer only supports searching with regular expressions.</note> <paragraph xml-lang="en-US" id="par_id3155182" role="paragraph">You can use regular expressions when you find and replace text in a document. For example, "s.n" finds "sun" and "son".</paragraph> <list type="ordered"> @@ -60,22 +60,29 @@ <listitem> <paragraph xml-lang="en-US" id="par_id3149641" role="listitem">The regular expression for a single character is a period (.).</paragraph> </listitem> + <listitem> + <paragraph xml-lang="en-US" id="par_id3149642" role="listitem">The regular expression for a word character \w, and \d for a decimal digit.</paragraph> + </listitem> <listitem> <paragraph xml-lang="en-US" id="par_id3153136" role="listitem">The regular expression for zero or more occurrences of the previous character is an asterisk. For example: "123*" finds "12" "123", and "1233".</paragraph> </listitem> <listitem> - <paragraph xml-lang="en-US" id="par_id3149609" role="listitem">The regular expression combination to search for zero or more occurrences of any character is a period and asterisk (.*).</paragraph> + <paragraph xml-lang="en-US" id="par_id3149609" role="listitem">The regular expression to search for zero or more occurrences of any character is a period and asterisk (.*).</paragraph> + </listitem> + <listitem> + <paragraph xml-lang="en-US" id="par_id3153138" role="listitem">The regular expression for one or more occurrences of the previous character is a plus sign (+). For example: "\w+" finds any word, "\d+" any number.</paragraph> </listitem> <listitem> - <paragraph xml-lang="en-US" id="par_id3149854" role="listitem">The regular expression for the end of a paragraph is a dollar sign ($). The regular expression character combination for the start of a paragraph is a caret and a period (^.).</paragraph> + <paragraph xml-lang="en-US" id="par_id0509200916345545" role="listitem">The regular expression for a tab character is . More generally, \s stands for all kinds of "spaces", like non-breaking space, carriage return ... </paragraph> </listitem> <listitem> - <paragraph xml-lang="en-US" id="par_id0509200916345545" role="listitem">The regular expression for a tab character is .</paragraph> + <paragraph xml-lang="en-US" id="par_id3149854" role="listitem">The regular expression for the end of a paragraph is a dollar sign ($). The regular expression for the start of a paragraph is a caret and a period (^.). The regular expression for an empty paragraph is ^$.</paragraph> </listitem> </list> - <paragraph xml-lang="en-US" id="par_id3153414" role="note">A search using a regular expression will work only within one paragraph. To search using a regular expression in more than one paragraph, do a separate search in each paragraph.</paragraph> + <paragraph xml-lang="en-US" id="par_id3153414" role="note">A search using a regular expression will work only within one paragraph. That is, a will match a line break within a paragraph.</paragraph> <section id="relatedtopics"> <embed href="text/shared/01/02100001.xhp#02100001"/> + <embed href="text/swriter/guide/removing_line_breaks.xhp#removing_line_breaks"/> <embed href="text/scalc/guide/wildcards.xhp#wildcards_h1"/> </section> </body>