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 8247753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:57:31+00:00 2026-06-07T22:57:31+00:00

I am not sure if this question should go here. How should i change

  • 0

I am not sure if this question should go here.

How should i change the youtube preference cookie so that safety mode is always on?

PREF=f1=50000000&fms2=30000&fms1=30000&fv=10.3.183

This is the pref cookie and fms2 changes to 10000 if safe search is turned off. I used regex replace to replace the text if fms2=10000 comes in the cookie. But this doesn’t seem to work. How do I change the cookie so that turning off safety-mode will turn it back on due to the cookie replace?

  • 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-07T22:57:33+00:00Added an answer on June 7, 2026 at 10:57 pm

    First: I am really not sure if I understand your question correctly. For a static string replacement from fms2=10000 to fms2=30000 you should not necessarily need to use Regex. “Normal” string replacement would also do it. But I guess there is more? Which language do you use?

    Second: What do you mean by “that turning off safety-mode will turn it back on due to the cookie replace”? Do you want to swap the logic: “turn off” does actually a “turn on” and vice versa?

    Third: Is there some additional modification in your data like URL encoding that you are maybe not aware of?

    UPDATE:
    My guess for the regex is (PCRE syntax – I am not so familiar with C++)

    /^(?=PREF\=)(.*?(?:PREF\=|&)fms2=).*?($|&.*)/
    

    replaced by

    $130000$2
    

    This would match

    PREF=f1=50000000&fms2=10000&fms1=30000&fv=10.3.183
    PREF=f1=50000000&fms2=&fms1=30000&fv=10.3.183
    PREF=f1=50000000&fms1=30000&fv=10.3.183&fms2=123
    PREF=fms2=123&f1=50000000&fms1=30000&fv=10.3.183
    

    But it sounds like this is not only a regex problem, isn’t it? Please let me know if you are facing problems or you need an explanation of the pattern.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not 100% sure how I should word this question but I'll try my
I'm not even sure how I should phrase this question. I'm passing some CustomStruct
I'm not sure this question is appropriate here but I hope I could get
I am not sure if this question is already answered. But here it goes:
I'm not sure whether this question belongs on StackOverflow or SuperUser, but here goes
I'm not sure if this is the right place for this question, but here
Not sure if this is the right forum for me to ask this question.
I'm not sure if this question fits properly, but I'm wondering in tile-based games,
I'm not sure if this question has been asked before but are there any
I'm not sure if this is the right place to post this question but

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.