Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4106594
MhchemRegExp.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
948 B
Referenced Files
None
Subscribers
None
MhchemRegExp.php
View Options
<?php
/**
* Copyright (c) 2023 Johannes Stegmüller
*
* This file is a port of mhchemParser originally authored by Martin Hensel in javascript/typescript.
* The original license for this software can be found in the accompanying LICENSE.mhchemParser-ts.txt file.
*/
namespace
MediaWiki\Extension\Math\WikiTexVC\Mhchem
;
/**
* Wrapper class to declare a hardcoded string to a regular expression.
* @author Johannes Stegmüller
* @license GPL-2.0-or-later
*/
class
MhchemRegExp
{
/** @var string regular expression pattern as a string */
private
string
$regexp
;
/**
* Utility class to distinguish Regular expression strings defined in
* the codebase of mhchemParser from regular strings.
* @param string $pattern regular expression pattern, usually of the format "/regexp/"
*/
public
function
__construct
(
string
$pattern
)
{
$this
->
regexp
=
$pattern
;
}
public
function
getRegExp
():
string
{
return
$this
->
regexp
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 19:38 (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b7/2a/30cebb51480ae6fc477307582c85
Default Alt Text
MhchemRegExp.php (948 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment