Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React parse string

Parse any regex expression in your string with React.

Basic usage

<ParseString
    rules={[
        {
            regex: /(#[\p{L}\w]+)/igu,
            render: (value, index) => <Link to={`/tag/${value.substr(1)}`} key={index}>{value}</Link>
        },
        {
            regex: /(@[a-z\d-]+)/ig,
            render: (value, index) => <Link to={`/${value.substr(1)}`} key={index}>{value}</Link>
        }
    ]}
>
    We are a group of #developers helping people reach whatever they dream of.
</ParseString>

More to come...

About

Parse any regex expression in your string with React.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages