Skip to content

Commit d12a86e

Browse files
committed
Update readme to include multiple replacement example
1 parent cb815c4 commit d12a86e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ You can run multiple replacements on one string by calling the function multiple
7070
```js
7171
const reactStringReplace = require('react-string-replace')
7272

73-
const text = 'Hey @ian_989, check out this link https://github.com/iansinnott/. Hope to see you at #reactconf';
73+
const text = 'Hey @ian_989, check out this link https://github.com/iansinnott/ Hope to see you at #reactconf';
7474
let replacedText;
7575

7676
// Match URLs
77-
replacedText = replaceString(originalTweet, /(https?:\/\/\S+)/g, match => (
77+
replacedText = replaceString(text, /(https?:\/\/\S+)/g, match => (
7878
<a href={match}>{match}</a>
7979
));
8080

0 commit comments

Comments
 (0)