Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Home
- >
- FrameMaker
- >
- How do you find numbers with a period

Highlighted
##

Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

How do you find numbers with a period

Explorer
,

Oct 07, 2016

Copy link to clipboard

Copied

FM - 2015 - Unstructured - Win 10

Using a Wildcard search, how do you find numbers with a period. Like 111.22 or 1.33 or 334566.9877665?

Community Guidelines

How do you find numbers with a period

Explorer
,

Oct 07, 2016

Copy link to clipboard

Copied

FM - 2015 - Unstructured - Win 10

Using a Wildcard search, how do you find numbers with a period. Like 111.22 or 1.33 or 334566.9877665?

Community Guidelines

lindal57129284

Oct 07, 2016
0
/t5/framemaker/how-do-you-find-numbers-with-a-period/td-p/8637016
2
Replies
2

Adobe Community Professional
,

Oct 08, 2016

Copy link to clipboard

Copied

`[0-9].[0-9]`

with

☑ Use Wildcards

Community Guidelines

Reply

Loading...

Bob_Niland

Oct 08, 2016
0
/t5/framemaker/how-do-you-find-numbers-with-a-period/m-p/8637017#M48150
Stefan-Gentz
LATEST

Adobe Employee
,

Oct 08, 2016

Copy link to clipboard

Copied

The example from Bob Niland (Error 7103) works for some of your examples, but not all. The results are a little bit unpredictable because of the "." which is a reserved character in RegEx. It will not always find the "." itself, and never the whole number.

To find always "one number+dot+one number" you will need to "escape" the dot with a backslash:

`[0-9]\.[0-9]`

This will find the following in your examples:

`111.22`

`1.33`

`334566.9877665`

If you want to find the whole number including the dot, you will need to add a "possessive quantifier". A possessive quantifier extends the search "As many times as possible, without giving back":

`[0-9]++\.[0-9]++`

This will find the following in your examples:

`111.22`

`1.33`

`334566.9877665`

A slightly more elegant version of the same is this:

`\d++\.\d++`

(`\d`

is the shorthand character class for "digit")

Now, maybe you want to find and replace all these dot's with a comma? Easy: Just wrap the digit groups into a "numbered capturing group" by putting them into (brackets) Like this.

`(\d++)\.(\d++)`

Each of these (groups) will have an "internal" number: 1, 2 etc.

Now you can reference these groups in the "Change" text field with `$#`

and replace the dot with a comma. Like this:

**Find:** `(\d++)\.(\d++)`

**Change:** `$1,$2`

This will find all of your examples and replace the "." in them with a ",".

Result:

`111,22`

`1,33`

`334566,9877665`

You might also find the post on the Adobe TechComm Blog by Marek Pawelec interesting: “Do the magic: Regular Expressions in FrameMaker”

Also, if you want to get deeper into RegEx, you might find the small tool "RegexBuddy" very helpful, to build complex regular expressions. It can be something extremely powerful!

Hope that helps 🙂

Community Guidelines

Reply

Loading...

Stefan-Gentz

Oct 08, 2016
3
/t5/framemaker/how-do-you-find-numbers-with-a-period/m-p/8637018#M48151
Using the Community
Experience League
Terms of Use
Privacy Policy
Cookie preferences
AdChoices
Language:

- Deutsch
- English
- Español
- Français
- 日本語コミュニティ
- Português

Copyright © 2020 Adobe. All rights reserved.