Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8614977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:15:25+00:00 2026-06-12T05:15:25+00:00

I am use a rex in splunk to extract the decimal amount from a

  • 0

I am use a rex in splunk to extract the decimal amount from a field that contains the amount plus the 3-digit currency code. Both values are separated by a space.

Examples:

200.00 INR
2390.11 INR
1.00 INR
1789.00 INR

I am using the rex command inline:

rex field=TxnAmt "(?<TxnAmt>[^\s]\d+.\d+)

Using this command is mostly successful, but where my error comes into play is with the 1.00 INR.

Results:

200.00
2390.11
1.00 INR
1789.00

Any ideas would be helpful. Full Disclaimer: I am not a full programmer, nor do I aspire to be, but I do enjoy writing Regexs on Splunk.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:15:26+00:00Added an answer on June 12, 2026 at 5:15 am

    There are a few problems with your current regex, try changing [^\s]\d+.\d+ to the following:

    \d+\.\d+
    

    Your current regex does not escape the ., so the . in your regex will actually match any character. I’m not really sure what you are trying to do with [^\s], since this will match a single non-whitespace character, and it looks like you are only interested in the digits.

    Your current regex fails on “1.00 INR” because the 1 is matched by [^\s], and then your regex looks for one or more digits but the next character is a ..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Use case: I find a piece of code that I do not understand at
use the [] symbol in the name of the form field you are submitting
Use case example: Client A comes to request sales information, enters their zip code
Use Eclipse Classic with ADT plugin. Tried to make project from existing example of
Use scenario is pretty simple: I have a desktop only application that could be
I found some source code in this thread posted by Rex Logan here on
use this code, in the Preferences activity, to know when the reset preference has
use case example I have a servlet that is receiving login requests. If a
I am writing a program in Python, that reads the YV12 Frame data from
USE AdventureWorks; GO BEGIN TRANSACTION; GO DELETE FROM HumanResources.JobCandidate WHERE JobCandidateID = 10; DELETE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.