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

  • Home
  • SEARCH
  • 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 9204011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:36:20+00:00 2026-06-17T23:36:20+00:00

Hi Im trying to get a RegEx to work. I have this text: /Ffont2

  • 0

Hi Im trying to get a RegEx to work. I have this text:

/Ffont2 45.83 Tf  252 980 Td (XX7445 DDA PURCHASE 05/28 04:48
MCDONALD'S F561 CHICAGO IL 105/29          10.25) Tj ET
0.000000 0.000000 0.000000 rg 0.000000 0.000000 0.000000 RG BT /Ffont2 45.83 Tf  252 937 Td (   12333378 214904443) Tj ET
0.000000 0.000000 0.000000 rg 0.000000 0.000000 0.000000 RG BT /Ffont2 45.83 Tf  252 894 Td (CITI CARD ONLINE PAYMENT 12345678                    05/29          87.99) Tj ET
0.000000 0.000000 0.000000 rg 0.000000 0.000000 0.000000 RG BT /Ffont2 45.83 Tf  252 851 Td (XX7445 DDA PURCHASE 0528 14:11 #03632 JEWEL CHICAGO IL     0529          97.60) Tj ET

and Im trying to get everything from Td to Tj like

Td (CITI CARD ONLINE PAYMENT 12345678                    05/29                87.99) Tj

but I want to skip things if they have no date, (must have forward slash), they must have a money amount(must have period) and I dont want it if it has the word “purchase” in it. So

Td (XX7445 DDA PURCHASE 0528 14:11 #03632 JEWEL CHICAGO IL     0529         97.60) Tj

would not be returned. right now I have

(Td \()([^\)]*)([^\)]*)([/][^\)]*[.][^\)]*\) Tj)

for my regex and that gets everything but it gets it even it has “purchase”

  • 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-17T23:36:21+00:00Added an answer on June 17, 2026 at 11:36 pm

    What you have is fine. Regex can be used for this.. but why put a Formula 1 car on a go-kart track (<— bad analogy..) waste CPU cycles?

    var matchesWithoutPurchase = Regex.Matches(yourInput, @"(Td \()([^\)]*)([^\)]*)([/][^\)]*[.][^\)]*\) Tj)")
        .Cast<Match>().Where(x => !x.Value.ToLower().Contains("purchase"));
    
    foreach (var match in matchesWithoutPurchase) {
        Console.WriteLine(match);
    }
    

    Regex negative lookarounds are overkill for this.

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

Sidebar

Related Questions

I'm trying to get the pipe (OR) to work. I have this regular expression
I am trying to get the following regex to work on ios in order
I'm trying to get the following regex to work on my String: Pattern Regex
I'm trying to get the regex to work that I found in a question
Been beating my head against a wall trying to get this to work -
I have a <div contenteditable=true> that I am trying to use to get text
I have this regex: /.*v\=([\w-]+).*(&autoplay\=1)?/ Which I am trying to match against: http://www.youtube.com/watch?v=awmLS6GCJno&width=1000&height=300&autoplay=1 This
I have been trying to use regex but I cant seem to get it
I'm stuck trying to get a regex to match a filetype in a sorting
I'm trying to get all words inside a string using Boost::regex in C++. Here's

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.