[
https://issues.apache.org/jira/browse/GROOVY-9925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17276744#comment-17276744
]
Paul King commented on GROOVY-9925:
-----------------------------------
Actually, the {{text ==~ /match/}} example follows on from the previous example:
{code}
def text = "some text to match"
def m = text =~ /match/
{code}
> Groovy match operator documentation should contain real examples and slashy
> strings reminder
> --------------------------------------------------------------------------------------------
>
> Key: GROOVY-9925
> URL: https://issues.apache.org/jira/browse/GROOVY-9925
> Project: Groovy
> Issue Type: Documentation
> Affects Versions: 3.0.7
> Reporter: Alex Fredrickson
> Priority: Minor
>
> The [3.0.7 Groovy
> documentation|[https://docs.groovy-lang.org/latest/html/documentation/#_match_operator]]
> could be more clear on regex usage with match operators, particularly:
> # It would be helpful to note here that slashy strings are *required* for
> the match operator to work. `foo ==~ "^\s+$"` will never work. I know
> there's a section dedicated to slashy strings; it would be helpful to have a
> footnote here.
> # This section could benefit from a better example than `{{m = text ==~
> /match/}}`.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)