# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = (r"^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$Oracle Software Owner for Each Oracle Software Product\n\n"
r"You can create a single user (for example, oracle) to own both Oracle Database, and\n\n"
r"Oracle Restart installations.\n\n"
r"However, Oracle recommends that you create one software owner to own each Oracle\n\n"
r"software installation (typically, oracle, for the database software and grid for the\n\n"
r"Oracle Restart owner user).\n\n"
r"You must create at least one software owner the first time you install Oracle software\n\n"
r"on the system.\n\n"
r"Note:\n\n"
r"In Oracle documentation, a user created to own only Oracle Grid\n\n"
r"Infrastructure software installations is called the grid user. A user created to\n\n"
r"own either all Oracle installations, or only Oracle database installations, is\n\n"
r"called the oracle user.\n\n"
r"Standard Oracle Database Groups for Job Role Separation\n\n"
r"Review the standard Oracle Database groups.\n\n"
r"The following is a list of standard Oracle Database groups. These groups provide\n\n"
r"operating system authentication for database administration system privileges:\n\n"
r"Note:\n\n"
r"All these groups are automatically created as a part of Oracle Database\n\n"
r"installation on Windows.\n\n"
r"• The OSDBA group (ORA_DBA)\n\n"
r"Use this group the first time you install Oracle Database software on the system.\n\n"
r"This group identifies operating system user accounts that have database\n\n"
r"administrative privileges (the SYSDBA privilege) for all database instances running\n\n"
r"on the server.\n\n"
r"Members of the ORA_DBA group do not have SYSASM privileges on Oracle ASM\n\n"
r"instances, which are needed for mounting and dismounting disk groups.\n\n"
r"• The OSOPER group for Oracle Database (ORA_OPER)\n\n"
r"Use this group if you want a separate group of operating system users to have a\n\n"
r"limited set of database administrative privileges for starting up and shutting down\n\n"
r"the database (the SYSOPER privilege).\n\n"
r"• The OSDBA group for a particular Oracle home (ORA_HOMENAME_DBA)\n\n"
r"This group is created the first time you install Oracle Database software into a new\n\n"
r"Oracle home. This group identifies operating system user accounts that have\n\n"
r"Chapter 4\n\n"
r"Creating Required Operating System Groups and Users\n\n"
r"4-8")
test_str = "10.1.1.1f"
subst = ""
# You can manually specify the number of replacements by changing the 4th argument
result = re.sub(regex, subst, test_str, 1)
if result:
print (result)
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html