Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle q flag in regular expressions #23

Open
dsntk opened this issue Jan 6, 2024 · 0 comments
Open

Handle q flag in regular expressions #23

dsntk opened this issue Jan 6, 2024 · 0 comments
Labels
DMN 1.5 DMN specification version 1.5
Milestone

Comments

@dsntk
Copy link
Contributor

dsntk commented Jan 6, 2024

Source: https://www.w3.org/TR/xpath-functions-31/

q: if present, all characters in the regular expression are treated as representing themselves, not as metacharacters. In effect, every character that would normally have a special meaning in a regular expression is implicitly escaped by preceding it with a backslash. Furthermore, when this flag is present, the characters $ and \ have no special significance when used in the replacement string supplied to the fn:replace function. This flag can be used in conjunction with the i flag. If it is used together with the m, s, or x flag, that flag has no effect.

Examples:
fn:tokenize("12.3.5.6", ".", "q") returns ("12", "3", "5", "6")
fn:replace("a\b\c", "", "\", "q") returns "a\b\c"
fn:replace("a/b/c", "/", "$", "q") returns "a$b$c"
fn:matches("abcd", ".*", "q") returns false()
fn:matches("Mr. B. Obama", "B. OBAMA", "iq") returns true()

@dsntk dsntk added the DMN 1.5 DMN specification version 1.5 label Jan 6, 2024
@dsntk dsntk added this to the v0.0.5 milestone Jan 6, 2024
@dsntk dsntk added this to DSNTK Jan 6, 2024
@dsntk dsntk changed the title Handle 'q' flag in regular expressions Handle q flag in regular expressions Jan 6, 2024
@DariuszDepta DariuszDepta added DMN 1.6 DMN specification version 1.6 DMN 1.5 DMN specification version 1.5 and removed DMN 1.5 DMN specification version 1.5 DMN 1.6 DMN specification version 1.6 labels Nov 20, 2024
@DariuszDepta DariuszDepta modified the milestones: 0.2.0, 0.1.0 Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DMN 1.5 DMN specification version 1.5
Projects
None yet
Development

No branches or pull requests

1 participant