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

  • SEARCH
  • Home
  • 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 8759081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:42:42+00:00 2026-06-13T14:42:42+00:00

I have the following Pig Latin filter: filtered = FILTER raw BY year >=

  • 0

I have the following Pig Latin filter:

filtered = FILTER raw BY year >= 1960 AND string MATCHES '(?!.*[0-9].*|.{1}|.*@.*|.*www.*|.*http.*)';

I was intending to get the following results for the following strings:

a #false .{1}
email@example.com #false .*@.*
http://somesite.com #false .*http.*
www.somesite.com #false .*www.*
12word #false .*[0-9].*
wo12rd #false .*[0-9].*
word12 #false .*[0-9].*
red #true

Instead, I get an empty result set.

EDIT:
I’ve updated the regex to:

'^(?!.*[0-9].*|.{1}|.*@.*|.*www.*|.*http.*)$'

after m.buettner’s correction, but continue to get an empty result set.

  • 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-13T14:42:44+00:00Added an answer on June 13, 2026 at 2:42 pm

    There are two problems. Firstly it seems like Pig Latin requires you to match the full string instead of “just a match somewhere within the string”. But you negative lookahead does not consume any characters, so it does not match the full the string. This could simply be resolved by appending .*. Secondly your rule .{1} (where {1} is redundant) does not require this one character to be the only character in the string. So in your last example, it will simply consume the r of red and set off the negative lookahead.

    Thus, here is the solution:

    (?!.*[0-9]|.$|.*@|.*www|.*http).*
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following plist: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
Have following code: public interface ITest { string St1 { get; } } public
Assume I have the following input in Pig: some And I would like to
I have following fiddle: http://jsfiddle.net/BFSH4/ As you see there are two issues: The h1
I have following class: class A { public IEnumerable Song { get; set; }
I have the following scenario- Pig version used 0.70 Sample HDFS directory structure: /user/training/test/20100810/<data
Have following validation for year value from text input: if (!year.match(new RegExp('\\d{4}'))){ ... }
I have following block of code ///////////////////////////////////// CComVariant newVal; //pass the CComVariant and get
Have following String built SQL query: StringBuilder querySelect = new StringBuilder(select * from messages
I have following code: public class reader extends Activity { WebView mWebView; String mFilename;

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.