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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:46:19+00:00 2026-06-19T00:46:19+00:00

I’ve been trying to use a the following regular expression extractor Reference Name: FMSFlightPlan

  • 0

I’ve been trying to use a the following regular expression extractor

Reference Name: FMSFlightPlan
Regular Expression: (?s)<FMSFlightPlan>(.*?)</FMSFlightPlan>
Template: $1$
Match No. 1

to match the string between the two FMSFlightPlan tags in the XML (the number of lines between the tags varies, hence the (?s) establishing dotall mode)

<FMSFlightPlan>
6500
AN NTEST/GL 
- FPN/FN/RP:DA:LEMG:AA:LEXJ:F:BLN,N38092W003375.UN865. 
BUGIX,N42215W003381.R753.EMANU,N42575W003469 
 </FMSFlightPlan>

Several testing applications tell me that my regex is correct. However when I try to use a Beanshell Assertion to print out the captured string I get the error message:

Assertion error: true
Assertion failure: false
Assertion failure message: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: “import java.io.*; //write out the data results to a file outfile = “/Users/Dani . . . ” Token Parsing Error: Lexical error at line 12, column 380. Encountered: “\n” (10), after : “\”3811\tYes\tAAR\tSTN\t835\t\t$B738\tfp,nradps,art,CCAAN,EXCD,wp00,p00\t37919\ta0\ti\t10\t0\t3\t0\t \t14\t 25/M\t0000ADF\t140785\t133806\t006979\t01:15:00\t0484\t360\t0379\t360\t0112\t 000932\tP00 \t007115\t2013-02-13T21:23:00Z\t2013-02-14T08:35:00+00:00\t000837\t00:10:00\t000000\t00:00:00\t000837\t00:10:00\t000000\t000000\t000000\t00:00:00\t000000\t00:00:00\t”

So it seems the extractor returns a string but the Beanshell Assertion doesn’t recognize it as a variable. Why would this be the case after establishing dotall mode? Is there an escaping error somewhere? I also don’t understand what the error message means by

Encountered: "\n" 

since there are no \n characters in the text being parsed.

I’ve considered using XPath extractor instead of Regular Expression extractors but have heard that this is not optimal when a lot of operations or threads are involved.

  • 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-19T00:46:21+00:00Added an answer on June 19, 2026 at 12:46 am

    (?s) – means Single line, correct? It is then hitting a \n which is a new line signal. That is probably causing the error. It is not expecting a new line character.

    Could you use the regular Response Assertion? I think you can use the regex in the Patterns to test.

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

Sidebar

Related Questions

I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am confused How to use looping for Json response Array in another Array.
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace

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.