RosettaCodeData/Task/Regular-expressions/Stata/regular-expressions.stata

8 lines
140 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
scalar s="ars longa vita brevis"
* is there a vowel?
di regexm(s,"[aeiou]")
* replace the first vowel with "?"
di regexr(s,"[aeiou]","?")