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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:57:07+00:00 2026-06-17T05:57:07+00:00

$string() = This is with admin charges; What I intend to do is to

  • 0

$string() = “This is with admin charges”;

What I intend to do is to write down an X-Path with RegEx to return the statement above true in the sense that when $string contains “admin charge”, then the statement returns true.

See, the statement above can have the following keywords,

  1. admin && charge || charges
  2. administrative && charge || charges
  3. administration && charge || charges

See, all and all, the root keyword here is “admin” and “charge”.

Therefore, I would like to write a script that incorporates X-Path and RegEx in it.

The following is my approach so far,

contains(upper-case(normalize-space($string)), "ADMIN CHARGES")

This is still only matches exactly.

I researched, but mostly is to check for single keyword, like

contains(upper-case($string), "^[m/ADMIN CHARGE/]"

Thanks in advance

  • 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-17T05:57:08+00:00Added an answer on June 17, 2026 at 5:57 am

    Regular expression functions are part of the XPATH 2.0 syntax.

    However, PHP uses the libxml PHP extension to handle its XML Manipulation, which implements the XPATH 1.0 spec only.

    This answer shows an alternative using the PHP/Java Bridge and Saxon. It’s probably the best option for the moment.

    Using a XSLT 2.0 library, one could use the matches function. From TFM:

    fn:matches($input as xs:string?, $pattern as xs:string) as xs:boolean
    fn:matches( $input   as xs:string?,
                $pattern     as xs:string,
                $flags   as xs:string) as xs:boolean
    
    
    
    matches(., "admin\S*\scharges?", "i")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this string This is a <143>sample</143> regex <143>pa<665>t</665>tern</143> selection <143>by</143> tags in
I have a javascript string that contains the following: data-href=/Admin/Edit?pk=0001I&amp;rk=50050055 How can I change
So you have a String that is retrieved from an admin web UI (so
I have this string: Download it from [http://wordpress.org/extend/plugins/wordpress-mobile-admin/](http://wordpress.org/extend/plugins/wordpress-mobile-admin/) ; And i'm trying to convert
I have a string: 'This is some random text so you don't get upset
I have next interface public interface IMyInterface { string this[string key] { get; set;
Let's say I have a string This $0 is $2 $1. Still, \$$3 is
I am trying to get the the string this info inside this object lets
I need to obtain a Date object from this String:This is a example) M-27\nJUN-2012
Please help me somebody to convert unicodestring into string This is how i am

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.