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 7065331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:56:35+00:00 2026-05-28T04:56:35+00:00

In a console application I get as input the RTF (Rich text Format) code

  • 0

In a console application I get as input the RTF (Rich text Format) code of a file. The source is a database and data gathered via query.

My goal is to search whether in the input code, as string, is present the code: \par (end of carriage in RTF).
I tried with string.IndexOf and string.Contains but both returns me bad results since they match also code like: “\pard”.

Given a string like:

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}
{\f1\fnil\fcharset0 MS Sans Serif;}  
\deflang1033\pard\plain\tx0\f2\lang1033\fs20\cf1 Payment}

How can I build my condition so that it return false, since the string does not contain \par? Eventually how could I set a regex to say that exactly the keyword “\par” (so length 4 chars) and no other will match? Thanks.

EDIT: The language used is C# and I am developing the console application with VS 2010.

  • 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-05-28T04:56:36+00:00Added an answer on May 28, 2026 at 4:56 am

    You don’t tell us the language you are using, but generally you need a word boundary something like this:

    \\par\b
    

    to ensure that there is not a word character following

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

Sidebar

Related Questions

I would like to get file path as input in my Python console application.
I have a simple test application (C# console application) that does an HTTP GET
In a .NET Win console application, I would like to access an App.config file
I have a console application that require to use some code that need administrator
In my application,I am getting time input in a variable in string format e.g.
I am trying to build a console application that takes user input. I was
In my python linux console application I use curses to handle displaying of data.
I need to get the output (displayed data) from a Java Console App to
I need to process the input from the user in a console application, and
I am using log4net within a Console Application. My configuration file allow me to

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.