delight-im / delight-im/Localize

Extracting from XML with regex

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
46
Forks
24
PR merge metrics
No merged PRs in 30d

Description

The following regex may also work for extracting strings from XML when a file is uploaded to import:

```
/<\s*?(string|plurals|string-array).*?name\s*?=\s*?"\s*?([^"]+)\s*?".*?>(.*?)<\s*?\/\s*?\1\s*?\s*?>/gis
```

Results:
- \1 = type
- \2 = key/name
- \3 = contents

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.