BookmarkSubscribeRSS Feed
SASvtaUser
Calcite | Level 5

Hi all, I'm new to SAS VTA so some mercy please!

I'm trying to use REGEX rules to capture Uppercase or Proper case only, according to 8.5 user documentation:

"To add uppercase characters, use the following rule:"

REGEX:[A-Fa-f]

 However I tried to define REGEX:0125\-[A-Z], but the match is in both lower and upper case, as shown in the attachment.

SASvtaUser_0-1719824604428.png

So first question is why lower case were also matched?

And second, if I want to match the proper cased words within a sentence, how may I do that? 

Example: Stark Industries is a pioneering multinational conglomerate known for its cutting-edge advancements in technology and innovation. Founded by Howard Stark, it has grown into a global leader in aerospace, defense, and advanced manufacturing. With a commitment to pushing the boundaries of what's possible, Stark Industries continues to shape the future through its revolutionary products and solutions.

Say I would like to only match the words in bold in the above paragraph....

Loads of thanks!

5 REPLIES 5
rudfaden
Lapis Lazuli | Level 10

You could try something like this

[A-Z]{1}[a-z]+\s[A-Z]{1}[a-z]+

Explanation
[A-Z]{1} - singe upper case letter
[a-z]+ - multiple lower case letters

\s a single space

[A-Z]{1} - singe upper case letter

[a-z]+ - multiple lower case letters

do the sam

 

SASvtaUser
Calcite | Level 5

Thank you!!! I will try out!!

Could also ask on why is  REGEX:0125\-[A-Z] also returning lower case (0125-a) as a match?

rudfaden
Lapis Lazuli | Level 10
No. [A-Z] should only match a single Uppercase letter
SASvtaUser
Calcite | Level 5

Update: I tried the proposed solution, still not working...

The issue is still, uppercase or lowercase words are matched regardless. 

SASvtaUser_0-1719902052702.png

 

rudfaden
Lapis Lazuli | Level 10
Sounds like a bug. I would contact SAS support.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 685 views
  • 0 likes
  • 2 in conversation